okumin commented on code in PR #5077:
URL: https://github.com/apache/hive/pull/5077#discussion_r1598642918


##########
ql/src/test/queries/clientpositive/cbo_cte_materialization.q:
##########
@@ -0,0 +1,28 @@
+--! qt:dataset:src
+
+set hive.optimize.cte.materialize.threshold=1;
+set hive.optimize.cte.materialize.full.aggregate.only=false;

Review Comment:
   I found this fails if we disable `hive.query.planmapper.link.relnodes`.
   
   ```
   create table src (key string, value string);
   
   set hive.cbo.fallback.strategy=NEVER;
   set hive.query.planmapper.link.relnodes=false;
   set hive.optimize.ppd=false;
   
   EXPLAIN
   SELECT * FROM src WHERE key = '5'
   UNION ALL
   SELECT * FROM src WHERE key = '5';
   ```
   
   @zabetak As a potential workaround, I'm wondering if it makes sense to relax 
the validation and disable features with which PlanMapper is involved when 
"equivalence mapping violation" happens.
   I presume PlanMapper succeeds in 99.9% cases as most qtests succeed. 
Currently, the remaining 0.1% fails and it sounds like an excessive penalty. We 
can keep the validation for qtests so that we can minimize the risk of 
degradation.
   In my feeling, it could be possible to decrease the 0.1% to 0.05%, but could 
be tough to achieve 0% with a single patch.
   
https://github.com/okumin/hive/commit/dd5be1543b9426f5d6ab94a37d5cdf8136c5fec7



-- 
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]

Reply via email to