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

Type mismatch during flattening

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 1.19.0
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            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

                Slack

                  Issue deployment