Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.0.0
Description
I am doing Hive SQL to switch to Spark SQL.
In Hive SQL
hive> explain select *,row_number() over (partition by day) rn from testdb.zeropart_db;
OK
Explain
In Spark SQL
spark-sql> explain select *,row_number() over (partition by age ) rn from testdb.zeropart_db;
plan
== Physical Plan ==
org.apache.spark.sql.AnalysisException: Window function row_number() requires window to be ordered, please add ORDER BY clause. For example SELECT row_number()(value_expr) OVER (PARTITION BY window_partition ORDER BY window_ordering) from table
Time taken: 0.172 seconds, Fetched 1 row(s)
For better compatibility with migration. For better compatibility with migration, new parameters are added to ensure compatibility with the same behavior as Hive SQL
Attachments
Issue Links
- links to