[
https://issues.apache.org/jira/browse/HIVE-15402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982494#comment-15982494
]
Dudu Markovitz edited comment on HIVE-15402 at 4/25/17 7:27 AM:
----------------------------------------------------------------
Not a bug.
The documentation needed to be fixed (done).
For LAG, as well for some other functions (ROW_NUMBER, RANK etc.) the
ROWS/RANGE clause does not make any sense.
was (Author: dmarkovitz):
Not a bug.
The syntax in the documentation was wrong and I've fixed it.
For LAG, as well for some other functions (ROW_NUMBER, RANK etc.) the
ROWS/RANGE clause does not make any sense.
> LAG's PRECEDING does not work.
> ------------------------------
>
> Key: HIVE-15402
> URL: https://issues.apache.org/jira/browse/HIVE-15402
> Project: Hive
> Issue Type: Bug
> Affects Versions: 2.1.0
> Reporter: Ryu Kobayashi
> Assignee: Dudu Markovitz
>
> The syntax in the following manual does not work:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-LAGspecifyingalagof3rowsanddefaultvalueof0
> {code}
> SELECT a, LAG(a, 3, 0) OVER (PARTITION BY b ORDER BY C ROWS 3 PRECEDING)
> FROM T;
> {code}
> {code}
> FAILED: SemanticException Failed to breakup Windowing invocations into
> Groups. At least 1 group must only depend on input columns. Also check for
> circular dependencies.
> Underlying error: Expecting left window frame boundary for function
> LAG((tok_table_or_col a), 3, 0) Window
> Spec=[PartitioningSpec=[partitionColumns=[(tok_table_or_col
> b)]orderColumns=[(tok_table_or_col c) ASC NULLS_FIRST]]window(start=range(3
> PRECEDING), end=currentRow)] as LAG_window_0 to be unbounded. Found : 3
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)