You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Kevin Liew (JIRA)" <ji...@apache.org> on 2015/12/02 02:32:10 UTC

[jira] [Commented] (PHOENIX-2476) Recognize '+' and CONCAT as string concatenation operators

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

Kevin Liew commented on PHOENIX-2476:
-------------------------------------

Hi, I didn't see your comments while I was making changes. I added comments about a CONCAT function, which is not part of the ANSII standard but is provided by most databases for compatibility.

> Recognize '+' and CONCAT as string concatenation operators
> ----------------------------------------------------------
>
>                 Key: PHOENIX-2476
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2476
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.6.0
>            Reporter: Kevin Liew
>            Priority: Minor
>              Labels: newbie, phoenix, string
>
> Phoenix uses '||' (Oracle, ANSII) as the string concatenation operator symbol and does not recognize '+'
> (SQL Server) or 'concat' (which is used for portability because it is supported by most databases)
> If we try to use '+' we get an error from the queryserver
> {noformat}Type mismatch. VARCHAR for (COLUMN1 + KEYCOLUMN){noformat}
> The '+' 
> operator is not implemented for VARCHAR so it would be an improvement to implement the standard function for that '+' symbol
> If we try to use 'concat' we get an error:
> {noformat}org.apache.phoenix.schema.FunctionNotFoundException: ERROR 6001 (42F01): Function undefined. functionName=[CONCAT]{noformat}
> 'concat' is often used for cross-database compatibility. Most databases provide this function



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