zabetak commented on a change in pull request #2979:
URL: https://github.com/apache/hive/pull/2979#discussion_r796076167



##########
File path: ql/src/test/queries/clientpositive/order_null2.q
##########
@@ -0,0 +1,70 @@
+create table test1
+(
+  a string,
+  b timestamp,
+  c timestamp
+);
+
+INSERT INTO TABLE test1 VALUES
+('John Doe', '1990-05-10 00:00:00.0', '2022-01-10 00:00:00.0'),
+('John Doe', '1990-05-10 00:00:00.0', '2021-12-10 00:00:00.0'),
+('John Doe', '1990-05-10 00:00:00.0', '2021-11-10 00:00:00.0'),
+('John Doe', '1990-05-10 00:00:00.0', '2021-10-10 00:00:00.0'),
+('John Doe', '1990-05-10 00:00:00.0', '2021-09-10 00:00:00.0'),
+('John Doe', '1987-05-10 00:00:00.0', '2022-01-10 00:00:00.0'),
+('John Doe', '1987-05-10 00:00:00.0', '2021-12-10 00:00:00.0'),
+('John Doe', '1987-05-10 00:00:00.0', '2021-11-10 00:00:00.0'),
+('John Doe', '1987-05-10 00:00:00.0', '2021-10-10 00:00:00.0'),
+('John Doe', '1987-05-10 00:00:00.0', null);
+
+-- hive.default.nulls.last is true by default, it sets NULLS_FIRST for DESC
+EXPLAIN AST
+SELECT a, b, c, row_number() OVER (PARTITION BY a, b ORDER BY b DESC, c DESC)
+FROM test1;
+
+EXPLAIN
+SELECT a, b, c, row_number() OVER (PARTITION BY a, b ORDER BY b DESC, c DESC)
+FROM test1;
+
+SELECT a, b, c, row_number() OVER (PARTITION BY a, b ORDER BY b DESC, c DESC)
+FROM test1;

Review comment:
       I trust your judgement let's leave it as is.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to