Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-24318

Casting a number to boolean has different results between 'select' fields and 'where' condition

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The same cast in the following two sql:

      // SQL 1
      SELECT cast(0.1 as boolean)
      
      // SQL 2
      SELECT * from test2 where cast(0.1 as boolean)
      

      has different results.

      The cast result in SQL 1 is true and the cast in SQL 2 is false.

      Attachments

        Activity

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

          People

            xuyangzhong xuyang
            xuyangzhong xuyang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment