Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion forward_engineering/ddlProvider/ddlHelpers/functionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = ({ _, templates, assignTemplates, getFunctionArguments, getName
}
};
const getExecutionRows = (value, udf) => {
if (!value || !udf.functionReturnsSetOf) {
if (!value || (!udf.functionReturnsSetOf && !isFunctionReturnsTable(udf))) {
return '';
}

Expand All @@ -84,6 +84,11 @@ module.exports = ({ _, templates, assignTemplates, getFunctionArguments, getName
}
};

const isFunctionReturnsTable = (udf) => {
const returnType = (udf.functionReturnType || '').trim().toUpperCase();
return returnType.startsWith('TABLE');
};

return {
getFunctionsScript,
};
Expand Down
6 changes: 1 addition & 5 deletions properties_pane/container_level/containerLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,7 @@ making sure that you maintain a proper JSON format.
"valueType": "number",
"minValue": 0,
"step": 1,
"propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return.",
"dependency": {
"key": "functionReturnsSetOf",
"value": true
}
"propertyTooltip": "A positive number giving the estimated number of rows that the planner should expect the function to return."
},
{
"propertyName": "Support function",
Expand Down