Skip to content

Commit 512c7ac

Browse files
authored
Merge pull request #84 from hackolade/Fix/HCK-4304--hackolade-assignment-function-definition-in-pos
Fix/hck 4304 hackolade assignment function definition in pos
2 parents 8c67e44 + 059d74b commit 512c7ac

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

forward_engineering/ddlProvider/ddlHelpers/functionHelper.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = ({
8282
}
8383
};
8484
const getExecutionRows = (value, udf) => {
85-
if (!value || !udf.functionReturnsSetOf) {
85+
if (!value || (!udf.functionReturnsSetOf && !isFunctionReturnsTable(udf))) {
8686
return '';
8787
}
8888

@@ -99,6 +99,11 @@ module.exports = ({
9999
}
100100
};
101101

102+
const isFunctionReturnsTable = (udf) => {
103+
const returnType = (udf.functionReturnType || '').trim().toUpperCase();
104+
return returnType.startsWith('TABLE');
105+
};
106+
102107
return {
103108
getFunctionsScript,
104109
};

properties_pane/container_level/containerLevelConfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,7 @@ making sure that you maintain a proper JSON format.
312312
"valueType": "number",
313313
"minValue": 0,
314314
"step": 1,
315-
"propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return.",
316-
"dependency": {
317-
"key": "functionReturnsSetOf",
318-
"value": true
319-
}
315+
"propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return."
320316
},
321317
{
322318
"propertyName": "Support function",

0 commit comments

Comments
 (0)