You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2020/06/17 10:09:00 UTC

[jira] [Commented] (HIVE-23706) Fix nulls first sorting behavior

    [ 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)