TPC-H query support
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
In the TPC-H benchmark, when creating 'lineitem' and 'orders' as distributed tables and the remaining tables as reference tables, the following queries are unsupported:
- Q13 outer join with re-partitioning
- Q17 correlated subquery
- Q20 reference table in FROM when there's a subquery in WHERE
- Q22 reference table in FROM when there's a subquery in WHERE
These queries require improvements to the join order planner (e.g. use join restriction information) and recursive planning.
Q13:
Join order planner should recognise that ` LEFT JOIN ` requires re-partitioning both tables by the join column.
Alternatively, recursive planning could recursively plan a query of the form `(SELECT .* FROM INNER JOIN ..)` and then perform ` LEFT JOIN `.
Q17:
Join order planner should allow sublinks and recognise that `lineitem` (a distributed table) and `part` (a reference table) both need to be re-partitioned by `partkey` (semi-join clause) in order to handle the correlated subquery.
Q20:
Recursive planning should recognise the subquery in the WHERE clause on `part` should be recursively planned because of the additional, correlated subquery in the WHERE clause on `lineitem`
Join order planner should allow sublinks and recognise that `lineitem` (a distributed table) and `part` (a reference table) and `partsupp` (a reference table) all need to be re-partitioned by `partkey` (semi-join clause) in order to handle the join in the correlated subquery.
Q22:
Recursive planning should recognise the subquery in the WHERE clause on `customer` should be recursively planned because of the additional, correlated subquery in the WHERE clause on `orders`
Join order planner should allow sublinks and recognise that `orders` (a distributed table) and `customer` (a reference table) both need to be re-partitioned by `custkey` (semi-join clause) in order to handle the join in the correlated subquery.
Contributor guide
Assessment
This issue has not been assessed yet.