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

Casting dynamic variable twice throws exception

    XMLWordPrintableJSON

Details

    Description

      Executing of

      SELECT CAST(CAST(? AS INTEGER) AS CHAR)

      query throws exception:

      Conversion to relational algebra failed to preserve datatypes:
      validated type:
      RecordType(CHAR(1) NOT NULL EXPR$0) NOT NULL
      converted type:
      RecordType(CHAR(1) EXPR$0) NOT NULL
      rel:
      LogicalProject(EXPR$0=[CAST(?0):CHAR(1)])
        LogicalValues(tuples=[[{ 0 }]])
      

      Testcase - https://github.com/apache/calcite/commit/4e32d2997b80effda66d46af06ec376b44856ead

      Attachments

        Issue Links

          Activity

            People

              dmsysolyatin Dmitry Sysolyatin
              dmsysolyatin Dmitry Sysolyatin
              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 - 1.5h
                  1.5h