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

[fix](hive) support partition prune for _HIVE_DEFAULT_PARTITION_ #31736

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

morningman
Copy link
Contributor

Proposed changes

This PR #23026 support the partition prune for hive table with _HIVE_DEFAULT_PARTITION,
but it will always select partition with _HIVE_DEFAULT_PARTITION.

This PR #31613 support null partition for olap table's list partition, so we can treat _HIVE_DEFAULT_PARTITION
as null partition of hive table.

So this PR change the partition prune logic

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@morningman morningman changed the title Hive default partition [fix](hive) support partition prune for _HIVE_DEFAULT_PARTITION_ Mar 4, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

PR approved by at least one committer and no changes requested.

Copy link
Contributor

github-actions bot commented Mar 4, 2024

PR approved by anyone and no changes requested.

@morningman
Copy link
Contributor Author

run buildall

// If any partition key is hive default partition, return true.
// Only used for hive table.
public boolean isHiveDefaultPartition() {
for (PartitionKey partitionKey : partitionKeys) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isDefaultPartition() not need delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, isDefaultPartition() is for other cases.
"default" partition is not "null" partition.
the _HIVE_DEFAULT_PARTITION_ is actually "null" partition in Doris

@morningman morningman merged commit 2bbbdae into apache:master Mar 5, 2024
35 of 40 checks passed
yiguolei pushed a commit that referenced this pull request Mar 6, 2024
)

This PR #23026 support the partition prune for hive table with `_HIVE_DEFAULT_PARTITION`,
but it will always select partition with `_HIVE_DEFAULT_PARTITION`.

This PR #31613 support null partition for olap table's list partition, so we can treat `_HIVE_DEFAULT_PARTITION`
as null partition of hive table.

So this PR change the partition prune logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.x reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants