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

IN-list that includes NULL converted to Values throws exception

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.27.0
    • 1.29.0
    • None

    Description

      Run this SQL in JdbcExample :

      select * from foodmart.sales_fact_1997 as s where s.cust_id not in (null, 100) 
      

      will throw an exception:

      Caused by: org.apache.calcite.runtime.CalciteException: Cannot convert null to int

      Because when convert ROW values generate the wrong RelDataType:

      type=RecordType(JavaType(int) ROW_VALUE),tuples=[{ null }, { 100 }])

      should be(nullable):

      type=RecordType(INTEGER ROW_VALUE),tuples=[{ null }, { 100 }])

      Attachments

        Activity

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

          People

            nobigo xiong duan
            nobigo xiong duan
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 1h 10m
                1h 10m

                Slack

                  Issue deployment