You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "hongbin ma (JIRA)" <ji...@apache.org> on 2016/09/14 10:37:21 UTC

[jira] [Updated] (CALCITE-1375) Why "select CONCAT('a','b') from EMPS" won't work?

     [ https://issues.apache.org/jira/browse/CALCITE-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

hongbin ma updated CALCITE-1375:
--------------------------------
    Description: 
Hi experts,

I have some confusing observations:

select QUARTER(DATE'2010-01-02') from EMPS; 
OK
select {fn QUARTER(DATE'2010-01-02')} from EMPS; 
OK
select {fn CONCAT('a','b')} from EMPS; 
OK
select CONCAT('a','b') from EMPS; 
Error: Error while executing SQL "select CONCAT('a','b') from EMPS": From line 1, column 8 to line 1, column 22: No match found for function signature CONCAT(<CHARACTER>, <CHARACTER>) (state=,code=0)

why is CONCAT without function escape failing? is there any reasons behind this? 

I'm using calcite 1.8.0's sqlline under example/csv 

thanks!



  was:
Hi experts,

I have some confusing observations:

select QUARTER(DATE'2010-01-02') from EMPS; --> OK
select {fn QUARTER(DATE'2010-01-02')} from EMPS; --> OK
select {fn CONCAT('a','b')} from EMPS; --> OK

select CONCAT('a','b') from EMPS; -->
Error: Error while executing SQL "select CONCAT('a','b') from EMPS": From line 1, column 8 to line 1, column 22: No match found for function signature CONCAT(<CHARACTER>, <CHARACTER>) (state=,code=0)

why is CONCAT without function escape failing? is there any reasons behind this? 

I'm using calcite 1.8.0's sqlline under example/csv 

thanks!




> Why "select CONCAT('a','b') from EMPS" won't work?
> --------------------------------------------------
>
>                 Key: CALCITE-1375
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1375
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: hongbin ma
>            Assignee: Julian Hyde
>
> Hi experts,
> I have some confusing observations:
> select QUARTER(DATE'2010-01-02') from EMPS; 
> OK
> select {fn QUARTER(DATE'2010-01-02')} from EMPS; 
> OK
> select {fn CONCAT('a','b')} from EMPS; 
> OK
> select CONCAT('a','b') from EMPS; 
> Error: Error while executing SQL "select CONCAT('a','b') from EMPS": From line 1, column 8 to line 1, column 22: No match found for function signature CONCAT(<CHARACTER>, <CHARACTER>) (state=,code=0)
> why is CONCAT without function escape failing? is there any reasons behind this? 
> I'm using calcite 1.8.0's sqlline under example/csv 
> thanks!



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