Stamatis Zampetakis created HIVE-29374:
------------------------------------------

             Summary: No CTE suggestion for TPC-DS query9
                 Key: HIVE-29374
                 URL: https://issues.apache.org/jira/browse/HIVE-29374
             Project: Hive
          Issue Type: Bug
          Components: CBO
            Reporter: Stamatis Zampetakis
            Assignee: Stamatis Zampetakis


The {{hive.optimize.cte.suggester.class}} property set to 
{{CommonTableExpressionIdentitySuggester}} triggers the common table expression 
(CTE) detection and rewrite logic.

The CTE tests indicate that for TPC-DS 
[query9|https://github.com/apache/hive/blob/1fd3fb9f1e5fa894c3888699caaec67d4c42d661/ql/src/test/results/clientpositive/perf/tpcds30tb/cte/cbo_query9.q.out]
 the {{CommonTableExpressionIdentitySuggester}} does not generate any 
suggestion (no "CTE Suggestion" entries in the output). This is unexpected 
since the CBO plan does contain some common table expressions:
{noformat}
HiveFilter(condition=[BETWEEN(false, $9, 1, 20)])
  HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales])
{noformat}
The sub-plan above appears at least 3 times in the query plan so it is a valid 
CTE candidate that should appear as a suggestion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to