Github user albertostratio commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/85#discussion_r49465200
--- Diff:
core/src/main/java/org/apache/metamodel/data/ScalarFunctionRow.java ---
@@ -49,8 +51,32 @@ public Object getValue(int index) throws
IndexOutOfBoundsException {
return _row.getValue(index - scalarFunctionCount);
}
final SelectItem selectItem = scalarFunctionSelectItems.get(index);
- final SelectItem selectItemWithoutFunction =
selectItem.replaceFunction(null);
- return selectItem.getScalarFunction().evaluate(_row,
selectItem.getFunctionParameters(), selectItemWithoutFunction);
+ if (selectItem.getScalarFunction().equals(FunctionType.CONCAT)) {
--- End diff --
Completely agree. In fact, I think this is completely wrong: we should use
the evaluate method of the concat function class instead of doing any logic in
here. I'll get rid of this if.
Thank you!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---