kasakrisz commented on code in PR #5089:
URL: https://github.com/apache/hive/pull/5089#discussion_r1497577693
##########
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:
I wanted to check which `materializeCTE` is called and bumped into an issue:
CBO is failing while running this explain query on the master branch:
Please see hive.log:
```
$ grep "CBO failed" ./itests/qtest/target/tmp/log/hive.log -A 2
2024-02-21T05:35:33,734 ERROR [8ab9e44c-43f0-401f-934d-3a271055c582 main]
parse.CalcitePlanner: CBO failed, skipping CBO.
org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: Could
not resolve column name
at
org.apache.hadoop.hive.ql.parse.type.RexNodeExprFactory.getPosition(RexNodeExprFactory.java:184)
~[hive-exec-4.0.0-beta-2-SNAPSHOT.jar:4.0.0-beta-2-SNAPSHOT]
```
--
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]