Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28252: AssertionError when using HiveTableScan with a HepPlanner cluster #5244

Closed
wants to merge 1 commit into from

Conversation

zabetak
Copy link
Contributor

@zabetak zabetak commented May 10, 2024

What changes were proposed in this pull request?

  1. Relax the assertion to not throw an error when the cluster does not contain a ConventionTraitDef (HepPlanner).
  2. Add tests to ensure that it is possible to create a HiveTableScan with VolcanoPlanner and HepPlanner and the expected convention is returned.

Why are the changes needed?

The HepPlanner is heavily used by the optimizer so it makes to be able to create a HiveTableScan with its respective cluster without residing in workarounds (such as requiring the creation of a VolcanoPlanner and obtaining the cluster from there).

More details under HIVE-28252.

Does this PR introduce any user-facing change?

No, anyways assertions are not enabled in production code.

Is the change a dependency upgrade?

No

How was this patch tested?

mvn test -Dtest=TestHiveTableScan

… cluster

The HepPlanner does not use any RelTraitDef so the default traitset for the respective cluster is always empty.

1. Relax the assertion to not throw an error when the cluster does not contain a ConventionTraitDef (HepPlanner).
2. Add tests to ensure that it is possible to create a HiveTableScan with VolcanoPlanner and HepPlanner and the expected convention is returned.
Copy link

sonarcloud bot commented May 10, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@kasakrisz kasakrisz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

@zabetak zabetak closed this in 0e84fe2 May 16, 2024
@zabetak zabetak deleted the HIVE-28252 branch May 16, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants