Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2926

Incorrect results - a predicate causes the number of rows to increase

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

Details

    Description

      The following two queries return a different number of rows, which should not be the case:

      SELECT
      1 AS int_col
      FROM (
      SELECT
      COALESCE(-783, -258, LEAD(893, 82) OVER (ORDER BY a1.string_col, a1.smallint_col DESC)) AS int_col,
      COALESCE(-784, 17, LEAD(320, 11) OVER (ORDER BY a1.bigint_col ASC, a1.bool_col ASC)) AS int_col_1
      FROM alltypes a1
      ) a2
      WHERE
      (-902.60962819) < (a2.int_col_1)
      
      SELECT
      COALESCE(-783, -258, LEAD(893, 82) OVER (ORDER BY a1.string_col, a1.smallint_col DESC)) AS int_col,
      COALESCE(-784, 17, LEAD(320, 11) OVER (ORDER BY a1.bigint_col ASC, a1.bool_col ASC)) AS int_col_1
      FROM alltypes a1
      

      Attachments

        Activity

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

          People

            alex.behm Alexander Behm
            tarasbob Taras Bobrovytsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment