[ https://issues.apache.org/jira/browse/HIVE-23706?focusedWorklogId=447234&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-447234 ]
ASF GitHub Bot logged work on HIVE-23706: ----------------------------------------- Author: ASF GitHub Bot Created on: 17/Jun/20 12:23 Start Date: 17/Jun/20 12:23 Worklog Time Spent: 10m Work Description: kasakrisz commented on a change in pull request #1131: URL: https://github.com/apache/hive/pull/1131#discussion_r441503698 ########## 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: Not sure about how up-to-date that document is but as far as I know we want nulls last as the default for asc and nulls first for desc. It can be controlled by the setting `hive.default.nulls.last`. Default value is `true`. I also run these queries with Postgres and got the same results as with this patch. ---------------------------------------------------------------- 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: 447234) Time Spent: 0.5h (was: 20m) > 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: 0.5h > 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)