> On May 6, 2015, 9:35 a.m., Gopal V wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java,
> >  line 96
> > <https://reviews.apache.org/r/33814/diff/2/?file=950853#file950853line96>
> >
> >     stray import?

will remove.


> On May 6, 2015, 9:35 a.m., Gopal V wrote:
> > ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out, line 3817
> > <https://reviews.apache.org/r/33814/diff/2/?file=950858#file950858line3817>
> >
> >     This seems rather strange, since the rows are still being read (i.e 
> > select 1 from lineitem_ix will return 3024 rows).
> >     
> >     Is this a stats mismatch due to this patch?

It is not due to this patch, but we have hit a corner case in stats annotation 
which we should track & fix seprately. My hunch is what happened here is column 
pruner pruned all columns (since constant value emerging from select operator 
is independent of value of any column) and then stats annotation code thought 
since no columns are referenced, it is outputting zero rows.
This is relatively a corner case where query is projecting only constants 
(i.e., dont need to make use of any table data). It will be good if stats 
annotation code can handle such a case.


- Ashutosh


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


On May 6, 2015, 6:35 a.m., Ashutosh Chauhan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33814/
> -----------------------------------------------------------
> 
> (Updated May 6, 2015, 6:35 a.m.)
> 
> 
> Review request for hive and Gopal V.
> 
> 
> Bugs: HIVE-9644
>     https://issues.apache.org/jira/browse/HIVE-9644
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> CASE comparison operator rotation optimization
> 
> 
> Diffs
> -----
> 
>   
> ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
>  e9436e5 
>   ql/src/test/queries/clientpositive/fold_case.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/fold_when.q PRE-CREATION 
>   ql/src/test/results/clientpositive/fold_case.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/fold_when.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/ql_rewrite_gbtoidx_cbo_2.q.out 6340a75 
> 
> Diff: https://reviews.apache.org/r/33814/diff/
> 
> 
> Testing
> -------
> 
> New tests added.
> 
> 
> Thanks,
> 
> Ashutosh Chauhan
> 
>

Reply via email to