You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Dean Wampler (JIRA)" <ji...@apache.org> on 2012/06/09 04:43:22 UTC

[jira] [Created] (HIVE-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

Dean Wampler created HIVE-3108:
----------------------------------

             Summary: SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
                 Key: HIVE-3108
                 URL: https://issues.apache.org/jira/browse/HIVE-3108
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.9.0, 0.8.0
         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
            Reporter: Dean Wampler


Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:

hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Edward Capriolo commented on HIVE-3108:
---------------------------------------

I am guessing he things that HIVE-2955 is patch available and is the same issue as this one. If that is that case we should just close this as a duplicate.
                
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.8.0, 0.9.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Arun A K updated HIVE-3108:
---------------------------

    Status: Patch Available  (was: Open)
    
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.9.0, 0.8.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Arun A K updated HIVE-3108:
---------------------------

    Priority: Major  (was: Trivial)
    
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.8.0, 0.9.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Edward Capriolo commented on HIVE-3108:
---------------------------------------

Confirmed fixed in trunk.
{noformat}
[edward@tablitha dist]$ bin/hive
Logging initialized using configuration in jar:file:/home/edward/hive/trunk/build/dist/lib/hive-common-0.10.0-SNAPSHOT.jar!/hive-log4j.properties
Hive history file=/tmp/edward/hive_job_log_edward_201206272349_386020253.txt
hive> create table stocks (x int, y string) partitioned by (exchange string, symbol string);
OK
Time taken: 17.382 seconds
hive> alter table stocks add partition (exchange='nasdaq', symbol='ed');
OK
Time taken: 2.022 seconds
hive> alter table stocks add partition (exchange='nasdaq', symbol='guy');
OK
Time taken: 0.219 seconds
hive> alter table stocks add partition (exchange='jp', symbol='bla');    
OK
Time taken: 0.245 seconds
hive> select count(distinct exchange), count(distinct symbol) from stocks;
2	3
Time taken: 5.742 seconds
{noformat}
                
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.8.0, 0.9.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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] [Resolved] (HIVE-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Edward Capriolo resolved HIVE-3108.
-----------------------------------

    Resolution: Duplicate
    
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.8.0, 0.9.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Arun A K updated HIVE-3108:
---------------------------

    Priority: Trivial  (was: Major)
    
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.8.0, 0.9.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>            Priority: Trivial
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

--
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-3108) SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column

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

Carl Steinbach updated HIVE-3108:
---------------------------------

    Status: Open  (was: Patch Available)

@Arun: Doesn't look like there's a patch here. Not sure why you changed the status to Patch Available.
                
> SELECT count(DISTINCT col) ... returns 0 if "col" is a partition column
> -----------------------------------------------------------------------
>
>                 Key: HIVE-3108
>                 URL: https://issues.apache.org/jira/browse/HIVE-3108
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.9.0, 0.8.0
>         Environment: Mac OSX running Apache distribution of hadoop and hive natively.
>            Reporter: Dean Wampler
>              Labels: Hive
>
> Suppose "stocks" is a managed OR external table, partitioned by "exchange" and "symbol". "count(DISTINCT x)" returns 0 for either "exchange", "symbol", or both:
> hive> SELECT count(DISTINCT exchange), count(DISTINCT symbol) from stocks;
> 0  0

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