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

EXTRACT function not working in CSVTest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.12.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: