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

EXTRACT function not working in CSVTest

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • 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

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment