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

[HUDI-6238] Disabling clustering for single file group #8760

Closed

Conversation

nsivabalan
Copy link
Contributor

@nsivabalan nsivabalan commented May 18, 2023

Change Logs

When there is only one file group for a given partition, we should avoid clustering. We added a config hoodie.clustering.plan.strategy.single.group.clustering.enabled to dicdate this. But the logic is such that, if sorting is enabled, and even if this config is set to true/false, we trigger clustering.

But revisiting the logic feels, we don't really need to rely on sorting. Even if the data within single file group may not be sorted, we don't really need to sort them, since the stats are going to remain intact before and after sorting (total valid values, min and max). So, even when sorting is enabled, we should not trigger clustering when file group count is just 1.

Impact

Will assist in avoid repeated clustering for partitions having 1 file group.

Risk level (write none, low medium or high below)

low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@nsivabalan nsivabalan added release-0.14.0 priority:critical production down; pipelines stalled; Need help asap. labels May 18, 2023
@hudi-bot
Copy link

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405
Copy link
Contributor

since the stats are going to remain intact before and after sorting (total valid values, min and max). So, even when sorting is enabled, we should not trigger clustering when file group count is just 1

I don't think so, the sorting is not for column stats, it is for query optimization, when the parquet file is sorted, less column group cound be touched while filtering the columns by filter predicates.

@KnightChess
Copy link
Contributor

since the stats are going to remain intact before and after sorting (total valid values, min and max). So, even when sorting is enabled, we should not trigger clustering when file group count is just 1

I don't think so, the sorting is not for column stats, it is for query optimization, when the parquet file is sorted, less column group cound be touched while filtering the columns by filter predicates.

yes agree, it can skip row group which not need by parquet filter use

@codope
Copy link
Member

codope commented Jun 28, 2023

This needs some more thought. I don't think we should take it in 0.14.0. We should also consider #6581 which is a more general approach.

@codope codope added table-service release-1.0.0 and removed priority:critical production down; pipelines stalled; Need help asap. release-0.14.0 labels Jun 28, 2023
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Feb 26, 2024
Copy link
Contributor

@yihua yihua left a comment

Choose a reason for hiding this comment

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

Closing this PR as it avoids sorting for query optimization. Feel free to reopen if needed. Thanks.

@yihua yihua closed this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-1.0.0 size:S PR with lines of changes in (10, 100] table-service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants