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

Type mismatch during flattening

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: 1.19.0
    • Component/s: core

      Description

      The following query causes Calcite not being able to perform SQL to Rel conversion:

      select (res1 = 'qwe') res2 from (select (case when (false) then null else 'qwe' end) res1 from (values(1)))
      

       
      While adding the query to SqlToRelConverTest, the test generates the following output:

      java.lang.AssertionError: 
      type mismatch:
      ref:
      CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
      input:
      CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL
      	at org.apache.calcite.test.SqlToRelConverterTest.testCaseFlatten(SqlToRelConverterTest.java:2786)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                laurent Laurent Goujon
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m