Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1375

Why "select CONCAT('a','b') from EMPS" won't work?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 1.9.0
    • None
    • None

    Description

      Hi experts,

      I have some confusing observations:

      query result
      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; FAIL

      The error message is :

      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?
      There're many JDBC escape functions in https://calcite.apache.org/docs/reference.html, is there a way to tell which can run without the "{fn" prefix?

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

      thanks!

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            mahongbin Hongbin Ma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: