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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.5.0, Impala 2.6.0, Impala 2.7.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Frontend
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: