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

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

GitHub user ardlema opened a pull request:

    https://github.com/apache/metamodel/pull/82

    METAMODEL-224 CONCAT function support first approach (non-functional)

    These are the first steps to add support for the CONCAT scalar function.
    
    I've got a bit bogged down with this, not sure whether I'm going down the 
right path. It's been quite complicated because is the first time we're having 
a function that might have one or more parameters and even the parameters might 
apply to one, two... columns or they might be just literals. We might have the 
following CONCAT functions:
    
    CONCAT(column1, "hello", column2)
    CONCAT("hello", "world")
    CONCAT(column1, column2)
    
    I've created a new select method with function and functionParameters where 
the functionParameters are going to be the column names (or literals). But I've 
found out that when I evaluate the function within my new ConcatFunction class 
the selectItems from the row do not contain all the columns so I can't get the 
values to create the result.
    
    I need some help to keep working on this :(

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ardlema/metamodel METAMODEL-224

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/82.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #82
    
----
commit 25e9713edf0329d152b10114f4ef3d422714c904
Author: Alberto Rodriguez <[email protected]>
Date:   2015-12-16T16:39:12Z

    First approach to add concat function

commit 204e047c5e43881e533c96df851b73d201b329bb
Author: Alberto Rodriguez <[email protected]>
Date:   2015-12-16T17:26:32Z

    Get the column values from SelectItem

commit 6852a15b69f7a7362d5b40f1145f6ebf1a8d8b0b
Author: Alberto Rodriguez <[email protected]>
Date:   2015-12-17T11:03:08Z

    New test for CONCAT scalar function

commit d79969ef38a59eac1bf3921b4223c8dc355dc61e
Author: Alberto Rodriguez <[email protected]>
Date:   2015-12-17T11:03:13Z

    Add conditions to make the new CONCAT scalar function work

----


> 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