[
https://issues.apache.org/jira/browse/HIVE-12017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15002245#comment-15002245
]
Jesus Camacho Rodriguez commented on HIVE-12017:
------------------------------------------------
[~ashutoshc], the summary about the issues that you mentioned.
- 1) Extra select/project operators do appear indeed. Many of these operators
could be removed, as they only rename columns. We can do this in a follow-up
JIRA, as this was an existing issue.
- 2) Some columns that are not used are pruned i.e. CBO column pruner covers
more cases than Hive column pruner.
- 3) They become cartesian products because i) they are joins between
constants, or ii) partition pruning kicked in and cartesian product = join.
- 4) Join inputs swapped: not an issue.
- 5) Some columns that are not used are pruned i.e. CBO column pruner covers
more cases than Hive column pruner.
- 6) Issue with SkewJoinOptimizer (HIVE-12391), reproducible without CBO on.
Thus, I think the only issue blocking enabling CBO by default is HIVE-12391.
> Do not disable CBO by default when number of joins in a query is equal or
> less than 1
> -------------------------------------------------------------------------------------
>
> Key: HIVE-12017
> URL: https://issues.apache.org/jira/browse/HIVE-12017
> Project: Hive
> Issue Type: Improvement
> Components: CBO
> Affects Versions: 2.0.0
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
> Attachments: HIVE-12017.01.patch, HIVE-12017.02.patch,
> HIVE-12017.03.patch, HIVE-12017.04.patch, HIVE-12017.05.patch,
> HIVE-12017.06.patch, HIVE-12017.07.patch, HIVE-12017.08.patch
>
>
> Instead, we could disable some parts of CBO that are not relevant if the
> query contains 1 or 0 joins. Implementation should be able to define easily
> other query patterns for which we might disable some parts of CBO (in case we
> want to do it in the future).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)