kasakrisz opened a new pull request #1966:
URL: https://github.com/apache/hive/pull/1966


   ### What changes were proposed in this pull request?
   During incremental materialized view rebuild CBO plain is transformed from 
an insert over write plan to a merge into plan if MV definition contains 
aggregate. During this transformation the union operator is replaced with a 
right outer join of the union branches and the join keys are coming from the 
aggregate keys. When building the join expressions the key equality checks are 
concatenated by `AND` operators. Building of `AND` expressions are throws 
AssertionError when only one operand/aggregate key/join key exists.
   
   ### Why are the changes needed?
   Check the number of expressions before creating the `AND` expression and 
return use expression itself as the root of the join expression if only one 
expression exists.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests 
-Dtest=TestMiniLlapLocalCliDriver 
-Dqfile=materialized_view_create_rewrite_one_key_gby.q,materialized_view_create_rewrite_4.q
 -pl itests/qtest -Pitests
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to