You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kevin Wilfong (JIRA)" <ji...@apache.org> on 2012/07/10 00:09:35 UTC

[jira] [Created] (HIVE-3247) Sorted by order of table not respected

Kevin Wilfong created HIVE-3247:
-----------------------------------

             Summary: Sorted by order of table not respected
                 Key: HIVE-3247
                 URL: https://issues.apache.org/jira/browse/HIVE-3247
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.10.0
            Reporter: Kevin Wilfong


When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.

e.g.
create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;

create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;

insert overwrite table table_desc select key, value from src;

insert overwrite table table_asc select key, value from src;

select * from table_desc;
...
96	val_96
97	val_97
97	val_97
98	val_98
98	val_98

select * from table_asc;
...
96	val_96
97	val_97
97	val_97
98	val_98
98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-3247) Sorted by order of table not respected

Posted by "Navis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Navis reassigned HIVE-3247:
---------------------------

    Assignee: Navis
    
> Sorted by order of table not respected
> --------------------------------------
>
>                 Key: HIVE-3247
>                 URL: https://issues.apache.org/jira/browse/HIVE-3247
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0
>            Reporter: Kevin Wilfong
>            Assignee: Navis
>
> When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.
> e.g.
> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;
> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;
> insert overwrite table table_desc select key, value from src;
> insert overwrite table table_asc select key, value from src;
> select * from table_desc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98
> select * from table_asc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3247) Sorted by order of table not respected

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412534#comment-13412534 ] 

Namit Jain commented on HIVE-3247:
----------------------------------

+1

Running tests
                
> Sorted by order of table not respected
> --------------------------------------
>
>                 Key: HIVE-3247
>                 URL: https://issues.apache.org/jira/browse/HIVE-3247
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0
>            Reporter: Kevin Wilfong
>            Assignee: Navis
>
> When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.
> e.g.
> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;
> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;
> insert overwrite table table_desc select key, value from src;
> insert overwrite table table_asc select key, value from src;
> select * from table_desc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98
> select * from table_asc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3247) Sorted by order of table not respected

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416063#comment-13416063 ] 

Hudson commented on HIVE-3247:
------------------------------

Integrated in Hive-trunk-h0.21 #1547 (See [https://builds.apache.org/job/Hive-trunk-h0.21/1547/])
    HIVE-3247 Sorted by order of table not respected
(Navis via namit) (Revision 1362342)

     Result = SUCCESS
namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362342
Files : 
* /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
* /hive/trunk/ql/src/test/queries/clientpositive/enforce_order.q
* /hive/trunk/ql/src/test/results/clientpositive/enforce_order.q.out

                
> Sorted by order of table not respected
> --------------------------------------
>
>                 Key: HIVE-3247
>                 URL: https://issues.apache.org/jira/browse/HIVE-3247
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0
>            Reporter: Kevin Wilfong
>            Assignee: Navis
>
> When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.
> e.g.
> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;
> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;
> insert overwrite table table_desc select key, value from src;
> insert overwrite table table_asc select key, value from src;
> select * from table_desc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98
> select * from table_asc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3247) Sorted by order of table not respected

Posted by "Navis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Navis updated HIVE-3247:
------------------------

    Status: Patch Available  (was: Open)

https://reviews.facebook.net/D4095
                
> Sorted by order of table not respected
> --------------------------------------
>
>                 Key: HIVE-3247
>                 URL: https://issues.apache.org/jira/browse/HIVE-3247
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0
>            Reporter: Kevin Wilfong
>            Assignee: Navis
>
> When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.
> e.g.
> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;
> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;
> insert overwrite table table_desc select key, value from src;
> insert overwrite table table_asc select key, value from src;
> select * from table_desc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98
> select * from table_asc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3247) Sorted by order of table not respected

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-3247:
-----------------------------

      Resolution: Fixed
    Hadoop Flags: Reviewed
          Status: Resolved  (was: Patch Available)

Committed. Thanks Navis
                
> Sorted by order of table not respected
> --------------------------------------
>
>                 Key: HIVE-3247
>                 URL: https://issues.apache.org/jira/browse/HIVE-3247
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0
>            Reporter: Kevin Wilfong
>            Assignee: Navis
>
> When a table a sorted by a column or columns, and data is inserted with hive.enforce.sorting=true, regardless of whether the metadata says the table is sorted in ascending or descending order, the data will be sorted in ascending order.
> e.g.
> create table table_desc(key string, value string) clustered by (key) sorted by (key DESC) into 1 BUCKETS;
> create table table_asc(key string, value string) clustered by (key) sorted by (key ASC) into 1 BUCKETS;
> insert overwrite table table_desc select key, value from src;
> insert overwrite table table_asc select key, value from src;
> select * from table_desc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98
> select * from table_asc;
> ...
> 96	val_96
> 97	val_97
> 97	val_97
> 98	val_98
> 98	val_98

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira