Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4432

Update error message to include all unsupported functions when frame clause is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.6.0
    • None
    • SQL Parser

    Description

      We need to update the error message to include LEAD, LAG, NTILE, and ranking functions, right now we only say ROW/RANGE is not allowed with RANK, DENSE_RANK or ROW_NUMBER functions, when frame clause is used in the window definition of any of these window functions.

      Another typo that needs fix in error message, it is not ROW/RANGE, it should be ROWS/RANGE (rows not row)

      An example of current error message that we see.

      0: jdbc:drill:schema=dfs.tmp> select LEAD(columns[3]) OVER(PARTITION BY CAST(columns[0] as integer) ORDER BY cast(columns[0] as integer) ROWS UNBOUNDED PRECEDING) from dfs.tmp.`t_alltype.csv`;
      Error: VALIDATION ERROR: From line 1, column 108 to line 1, column 111: ROW/RANGE not allowed with RANK, DENSE_RANK or ROW_NUMBER functions
      
      
      [Error Id: 98565028-bfd8-4f57-acdb-5235195d3d6d on centos-01.qa.lab:31010] (state=,code=0)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            khfaraaz Khurram Faraaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: