[ 
https://issues.apache.org/jira/browse/METAMODEL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094022#comment-15094022
 ] 

ASF GitHub Bot commented on METAMODEL-224:
------------------------------------------

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!


> Support CONCAT function
> -----------------------
>
>                 Key: METAMODEL-224
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-224
>             Project: Apache MetaModel
>          Issue Type: New Feature
>            Reporter: Alberto
>            Priority: Minor
>
> As we now support scalar functions it would be great to add support for a 
> CONCAT function that allow us to concatenate and append strings to the query 
> results.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to