[ https://issues.apache.org/jira/browse/HIVE-23706?focusedWorklogId=447240&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-447240 ]
ASF GitHub Bot logged work on HIVE-23706: ----------------------------------------- Author: ASF GitHub Bot Created on: 17/Jun/20 12:33 Start Date: 17/Jun/20 12:33 Worklog Time Spent: 10m Work Description: zabetak commented on a change in pull request #1131: URL: https://github.com/apache/hive/pull/1131#discussion_r441509021 ########## File path: ql/src/test/results/clientpositive/llap/order_null.q.out ########## @@ -116,12 +116,12 @@ POSTHOOK: query: SELECT x.* FROM src_null_n1 x ORDER BY b desc, a asc POSTHOOK: type: QUERY POSTHOOK: Input: default@src_null_n1 #### A masked pattern was here #### -2 B -1 A -2 A 2 NULL 3 NULL NULL NULL +2 B +1 A +2 A Review comment: OK, now I understand better, thanks for the clarification. The `hive.default.nulls.last` is a bit confusing. From the name and description I get the impression that NULLS LAST is the default behavior for both ASC and DESC and apparently it is not the case either. Yes the new results are in sync with Postgres since the latter uses the [semantics that you mentioned](https://www.postgresql.org/docs/12/queries-order.html). Note that this is not a rule from every DBMS. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 447240) Time Spent: 40m (was: 0.5h) > Fix nulls first sorting behavior > -------------------------------- > > Key: HIVE-23706 > URL: https://issues.apache.org/jira/browse/HIVE-23706 > Project: Hive > Issue Type: Bug > Components: Parser > Reporter: Krisztian Kasa > Assignee: Krisztian Kasa > Priority: Major > Labels: pull-request-available > Fix For: 4.0.0 > > Time Spent: 40m > Remaining Estimate: 0h > > {code} > INSERT INTO t(a) VALUES (1), (null), (3), (2), (2), (2); > select a from t order by a desc; > {code} > instead of > {code} > 3, 2, 2, 2, 1, null > {code} > should return > {code} > null, 3, 2 ,2 ,2, 1 > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)