Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-30374 Feature Parity between PostgreSQL and Spark (ANSI/SQL)
  3. SPARK-30708

first_value/last_value window function throws ParseException

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 3.0.0
    • None
    • SQL
    • None

    Description

      first_value/last_value throws ParseException

       

      SELECT first_value(unique1) over w,
      last_value(unique1) over w, unique1, four
      FROM tenk1 WHERE unique1 < 10
      +WINDOW w AS (order by four range between current row and unbounded following)
       
      org.apache.spark.sql.catalyst.parser.ParseException
       
      no viable alternative at input 'first_value'(line 1, pos 7)
       
      == SQL ==
      SELECT first_value(unique1) over w,
      -------^^^
      last_value(unique1) over w, unique1, four
      FROM tenk1 WHERE unique1 < 10
      WINDOW w AS (order by four range between current row and unbounded following)
      

       

      Maybe we need fix this issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              beliefer Jiaan Geng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: