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

EXTRACT function not working in CSVTest

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: None
    • Labels:
      None

      Description

      According to this doc https://calcite.apache.org/docs/reference.html the EXTRACT function should work in Calcite. So I'm trying a query with EXTRACT in CSVTest:

      @Test public void testSelectx() throws SQLException {
      checkSql("model", "select extract(year from JOINEDAT) from EMPS ");
      }
      the query failed due to:

      java.lang.ClassCastException: java.sql.Date cannot be cast to java.lang.Integer

      I also tried to change column JOINDAT's type to timestamp and datetime, but end up with similar exceptions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                mahongbin hongbin ma
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: