You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "N Campbell (JIRA)" <ji...@apache.org> on 2017/01/06 01:45:59 UTC
[jira] [Created] (HIVE-15547) nulls not sorted last on cursor
specification
N Campbell created HIVE-15547:
---------------------------------
Summary: nulls not sorted last on cursor specification
Key: HIVE-15547
URL: https://issues.apache.org/jira/browse/HIVE-15547
Project: Hive
Issue Type: Bug
Components: SQL
Affects Versions: 2.1.0
Reporter: N Campbell
Query that attempts to sort nulls last produces an incorrect result set.
(1) first column contains all null values which is wrong
(2) second column has not sorted the only null value as the last row
Hive server version: 2.1.0.2.5.3.0-37
Query:
SELECT `tint`.`rnum`, `tint`.`cint` FROM `tint` ORDER BY `tint`.`rnum` ASC NULLS LAST
Results:
tint.rnum tint.cint
<null> <null>
<null> -1
<null> 0
<null> 1
<null> 10
Source data
rnum cint
0 <null>
1 -1
2 0
3 1
4 10
Table
create table if not exists TINT ( RNUM int , CINT int )
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n'
STORED AS textfile ;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)