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

LEAD and LAG do not support a column for the default value

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 2.2
    • None
    • Backend

    Description

      The default values for the LEAD and LAG functions fails when using a column.

      ex: SELECT LEAD( column_name, 1, column_name ) FROM some_table

      This will only work if the default value is a constant.

      Here is some of the the grammar from SQL:2016:

      <lead or lag function> ::=
        <lead or lag> <left paren> <lead or lag extent>
            [ <comma> <offset> [ <comma> <default expression> ] ] <right paren>
            [ <null treatment> ]
      
      <default expression> ::=
        <value expression>
      
      <value expression> ::=
          <common value expression>
        | <boolean value expression>
        | <row value expression>
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmagaha_impala_004b David Magaha
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: