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

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            beliefer jiaan.geng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment