Please sign in to comment.
[SPARK-24033][SQL] Fix Mismatched of Window Frame specifiedwindowfram…
…e(RowFrame, -1, -1) ## What changes were proposed in this pull request? When the OffsetWindowFunction's frame is `UnaryMinus(Literal(1))` but the specified window frame has been simplified to `Literal(-1)` by some optimizer rules e.g., `ConstantFolding`. Thus, they do not match and cause the following error: ``` org.apache.spark.sql.AnalysisException: Window Frame specifiedwindowframe(RowFrame, -1, -1) must match the required frame specifiedwindowframe(RowFrame, -1, -1); at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$class.failAnalysis(CheckAnalysis.scala:41) at org.apache.spark.sql.catalyst.analysis.Analyzer.failAnalysis(Analyzer.scala:91) at ``` ## How was this patch tested? Added a test Author: gatorsmile <firstname.lastname@example.org> Closes #21115 from gatorsmile/fixLag. (cherry picked from commit 7bc853d) Signed-off-by: gatorsmile <email@example.com>
- Loading branch information...
Showing with 18 additions and 1 deletion.