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

IGNORE NULLS clause in analytic function fails with WHERE-clause subqueries.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.5.0, Impala 2.6.0, Impala 2.7.0
    • Impala 2.8.0
    • Frontend
    • None

    Description

      The IGNORE NULLS clause for the FIRST_VALUE() and LAST_VALUE() analytic functions does not work in combination with WHERE-clause subqueries that need to be rewritten into joins. Such queries fail with an analysis exception.

      Reproduction:

      select first_value(tinyint_col ignore nulls) over (order by id)
      from functional.alltypesagg t1
      where exists (select 1 from functional.alltypes t2 where t1.id = t2.id)
      ERROR: AnalysisException: Function FIRST_VALUE_IGNORE_NULLS does not accept the keyword IGNORE NULLS.
      

      Workaround
      Manually rewrite the WHERE-clause subquery into an appropriate join.

      Attachments

        Activity

          People

            alex.behm Alexander Behm
            alex.behm Alexander Behm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: