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

Casting dynamic variable twice throws exception

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

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

          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

                Slack

                  Issue deployment