hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stamatis Zampetakis (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-23706) Fix nulls first sorting behavior
Date Wed, 17 Jun 2020 10:09:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-23706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17138308#comment-17138308
] 

Stamatis Zampetakis commented on HIVE-23706:
--------------------------------------------

I have the impression that the example in the summary of this case is wrong at least as far
as it concerns the SQL standard. If NULLS FIRST is explicitly present then nulls always appear
first no matter if ASC or DESC is specified. Respectively, if NULLS LAST is present then nulls
always appear at the end.

> 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: 10m
>  Remaining Estimate: 0h
>
> {code}
> INSERT INTO t(a) VALUES (1, null, 3, 2, 2, 2)
> SELECT a FROM t ORDER BY a DESC NULLS FIRST
> {code}
> should return 
> {code}
> 3
> 2
> 2
> 2
> 1
> null
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message