okumin commented on code in PR #5089: URL: https://github.com/apache/hive/pull/5089#discussion_r1503670651
########## ql/src/test/queries/clientpositive/cte_mat_11.q: ########## @@ -0,0 +1,15 @@ +--! qt:dataset:src +set hive.optimize.cte.materialize.threshold=2; +set hive.optimize.cte.materialize.full.aggregate.only=false; + +EXPLAIN WITH materialized_cte1 AS ( + SELECT * FROM src +), +materialized_cte2 AS ( + SELECT * + FROM materialized_cte1 a + JOIN materialized_cte1 b ON (a.key = b.key) +) +SELECT * +FROM materialized_cte2 a +JOIN materialized_cte2 b ON (a.key = b.key); Review Comment: @kasakrisz You find very well! I didn't notice the possibility where my test case could be illegal. It will be probably invalid as far as I tested it with various parameters or other DBMS systems. I created the following ticket and am investigating more. https://issues.apache.org/jira/browse/HIVE-28088 Additionally, I changed `cte_mat_11.q` so that it contains only valid SQLs. I am guessing HIVE-28088 is disjunctive with HIVE-28080, and we can review this PR. Please feel free to put any other concerns. https://github.com/apache/hive/pull/5089/commits/961f27fce8c6be78bac8d44d70c25176a57a4fe1 Thanks a lot. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
