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

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

    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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: