You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Shreepadma Venugopalan <sh...@cloudera.com> on 2013/03/14 21:53:34 UTC

Review Request: HIVE-4119: ANALYZE TABLE ... COMPUTE STATISTICS FOR COLUMNS fails with NPE if the table is empty

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9929/
-----------------------------------------------------------

Review request for hive.


Description
-------

Enhances the column stats UDF and column stats task to handle empty tables. Adds new q file tests.


This addresses bug HIVE-4119.
    https://issues.apache.org/jira/browse/HIVE-4119


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java de28766 
  ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java 0e3846e 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java e09efb7 
  ql/src/test/queries/clientpositive/columnstats_tbllvl.q 187e8be 
  ql/src/test/queries/clientpositive/compute_stats_empty_table.q PRE-CREATION 
  ql/src/test/results/clientpositive/columnstats_tbllvl.q.out 3390ca0 
  ql/src/test/results/clientpositive/compute_stats_empty_table.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/9929/diff/


Testing
-------

Adds new q file tests which test column stats against an empty table.


Thanks,

Shreepadma Venugopalan


Re: Review Request: HIVE-4119: ANALYZE TABLE ... COMPUTE STATISTICS FOR COLUMNS fails with NPE if the table is empty

Posted by Shreepadma Venugopalan <sh...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9929/#review18308
-----------------------------------------------------------


Thanks for the comments Carl. Addresses review comments from revision 1.


ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java
<https://reviews.apache.org/r/9929/#comment38515>

    Done.



ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java
<https://reviews.apache.org/r/9929/#comment38516>

    Done



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38518>

    done



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38519>

    done



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38517>

    done


- Shreepadma Venugopalan


On March 14, 2013, 8:53 p.m., Shreepadma Venugopalan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9929/
> -----------------------------------------------------------
> 
> (Updated March 14, 2013, 8:53 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> Enhances the column stats UDF and column stats task to handle empty tables. Adds new q file tests.
> 
> 
> This addresses bug HIVE-4119.
>     https://issues.apache.org/jira/browse/HIVE-4119
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java de28766 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java 0e3846e 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java e09efb7 
>   ql/src/test/queries/clientpositive/columnstats_tbllvl.q 187e8be 
>   ql/src/test/queries/clientpositive/compute_stats_empty_table.q PRE-CREATION 
>   ql/src/test/results/clientpositive/columnstats_tbllvl.q.out 3390ca0 
>   ql/src/test/results/clientpositive/compute_stats_empty_table.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/9929/diff/
> 
> 
> Testing
> -------
> 
> Adds new q file tests which test column stats against an empty table.
> 
> 
> Thanks,
> 
> Shreepadma Venugopalan
> 
>


Re: Review Request: HIVE-4119: ANALYZE TABLE ... COMPUTE STATISTICS FOR COLUMNS fails with NPE if the table is empty

Posted by Shreepadma Venugopalan <sh...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9929/
-----------------------------------------------------------

(Updated March 23, 2013, 1:32 a.m.)


Review request for hive.


Changes
-------

Addresses review comments from revision # 1.


Description
-------

Enhances the column stats UDF and column stats task to handle empty tables. Adds new q file tests.


This addresses bug HIVE-4119.
    https://issues.apache.org/jira/browse/HIVE-4119


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java de28766 
  ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java 0e3846e 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java e09efb7 
  ql/src/test/queries/clientpositive/columnstats_tbllvl.q 187e8be 
  ql/src/test/queries/clientpositive/compute_stats_empty_table.q PRE-CREATION 
  ql/src/test/results/clientpositive/columnstats_tbllvl.q.out 3390ca0 
  ql/src/test/results/clientpositive/compute_stats_empty_table.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/9929/diff/


Testing
-------

Adds new q file tests which test column stats against an empty table.


Thanks,

Shreepadma Venugopalan


Re: Review Request: HIVE-4119: ANALYZE TABLE ... COMPUTE STATISTICS FOR COLUMNS fails with NPE if the table is empty

Posted by Carl Steinbach <ca...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9929/#review18250
-----------------------------------------------------------



ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java
<https://reviews.apache.org/r/9929/#comment38458>

    Please change this to "private static final int MAX_ROWS". In fact, since this constant is only referenced in two places, and since the value is 1, I think it would be easier to understand if the variable was eliminated.



ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java
<https://reviews.apache.org/r/9929/#comment38459>

    Please either change this to "static final int LIMIT = -1", or eliminate the variable.



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38461>

    Please add whitespace around operators.



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38462>

    Whitespace around operators.



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
<https://reviews.apache.org/r/9929/#comment38463>

    whitespace


- Carl Steinbach


On March 14, 2013, 8:53 p.m., Shreepadma Venugopalan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9929/
> -----------------------------------------------------------
> 
> (Updated March 14, 2013, 8:53 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> Enhances the column stats UDF and column stats task to handle empty tables. Adds new q file tests.
> 
> 
> This addresses bug HIVE-4119.
>     https://issues.apache.org/jira/browse/HIVE-4119
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java de28766 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java 0e3846e 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java e09efb7 
>   ql/src/test/queries/clientpositive/columnstats_tbllvl.q 187e8be 
>   ql/src/test/queries/clientpositive/compute_stats_empty_table.q PRE-CREATION 
>   ql/src/test/results/clientpositive/columnstats_tbllvl.q.out 3390ca0 
>   ql/src/test/results/clientpositive/compute_stats_empty_table.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/9929/diff/
> 
> 
> Testing
> -------
> 
> Adds new q file tests which test column stats against an empty table.
> 
> 
> Thanks,
> 
> Shreepadma Venugopalan
> 
>