> On Feb. 10, 2017, 6:57 p.m., Ashutosh Chauhan wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java, line 469
> > <https://reviews.apache.org/r/56517/diff/1/?file=1628784#file1628784line469>
> >
> >     Why is copy needed here? This operation can potentially be expensive, 
> > why do we need that?

The reason is that when we create view through cbo, we actually manipulate the 
originial ast. As a result, we lost the originial one. In the case when create 
view fails on cbo and we are going to fail back to semantic analyzer, we do not 
have originial ast but have manipulated ast instead, which will cause problem. 
One of the tests that will fail is selectDistinctStarNeg_1.q.


> On Feb. 10, 2017, 6:57 p.m., Ashutosh Chauhan wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java, lines 
> > 3474-3476
> > <https://reviews.apache.org/r/56517/diff/1/?file=1628784#file1628784line3474>
> >
> >     Why is this change limited only for native udtf ?

i just copy paste the corresponding part from semantic analyzer.


- pengcheng


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


On Feb. 9, 2017, 9 p.m., pengcheng xiong wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56517/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2017, 9 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-15769
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ASTNode.java fb1a309 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java 96ff5df 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 59d537f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java dceb4a5 
>   ql/src/test/queries/clientpositive/view_cbo.q PRE-CREATION 
>   ql/src/test/results/clientpositive/create_view.q.out 7deac3e 
>   ql/src/test/results/clientpositive/create_view_translate.q.out 78614f7 
>   ql/src/test/results/clientpositive/cte_2.q.out c2bc565 
>   ql/src/test/results/clientpositive/cte_4.q.out ce92dca 
>   ql/src/test/results/clientpositive/explain_ddl.q.out ee2a60a 
>   ql/src/test/results/clientpositive/explain_dependency.q.out 6ab41c7 
>   ql/src/test/results/clientpositive/explain_logical.q.out d1176c1 
>   ql/src/test/results/clientpositive/llap/cbo_views.q.out 2ac2d3a 
>   ql/src/test/results/clientpositive/llap/cte_2.q.out ef66c40 
>   ql/src/test/results/clientpositive/llap/cte_4.q.out ce92dca 
>   ql/src/test/results/clientpositive/llap/explainuser_1.q.out 621f337 
>   ql/src/test/results/clientpositive/llap/lineage3.q.out 495ad09 
>   ql/src/test/results/clientpositive/llap/selectDistinctStar.q.out afb9c4f 
>   ql/src/test/results/clientpositive/llap/subquery_views.q.out 185f08e 
>   ql/src/test/results/clientpositive/llap/union_top_level.q.out de23f48 
>   ql/src/test/results/clientpositive/perf/query14.q.out 21cabbc 
>   ql/src/test/results/clientpositive/spark/union_top_level.q.out 74719bb 
>   ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out 9f1a401 
>   ql/src/test/results/clientpositive/tez/explainuser_3.q.out 17c9ec3 
>   ql/src/test/results/clientpositive/view_alias.q.out 0d7e72f 
>   ql/src/test/results/clientpositive/view_cbo.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/56517/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengcheng xiong
> 
>

Reply via email to