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-8855] Add bucket properties for spark bucket index query pruning #12614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xicm
Copy link
Contributor

@xicm xicm commented Jan 10, 2025

Change Logs

we support bucket index pruning since HUDI-6207, but the configurations of bucket index doesn't been passed to SparkHoodieTableFileIndex.

Impact

none

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

none

Documentation Update

none

  • 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

@github-actions github-actions bot added the size:XS PR with lines of changes in <= 10 label Jan 10, 2025
@github-actions github-actions bot added size:S PR with lines of changes in (10, 100] and removed size:XS PR with lines of changes in <= 10 labels Jan 10, 2025
@hudi-bot
Copy link

CI report:

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

@@ -534,6 +535,15 @@ object HoodieFileIndex extends Logging {
properties.setProperty(RECORDKEY_FIELD.key, tableConfig.getRecordKeyFields.orElse(Array.empty).mkString(","))
properties.setProperty(PRECOMBINE_FIELD.key, Option(tableConfig.getPreCombineField).getOrElse(""))
properties.setProperty(PARTITIONPATH_FIELD.key, HoodieTableConfig.getPartitionFieldPropForKeyGenerator(tableConfig).orElse(""))

// for simple bucket index, we need to set the INDEX_TYPE, BUCKET_INDEX_HASH_FIELD, BUCKET_INDEX_NUM_BUCKETS
val dataBase = Some(tableConfig.getDatabaseName)
Copy link
Contributor

Choose a reason for hiding this comment

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

all of these properties are write configs, so we wanna fix it by explicitly setting up all the catalog properties.

@TheR1sing3un
Copy link
Member

The current index-related configuration items are divided into write config. Before bucket index pruning is implemented, these index-related write configurations are not used when reading, but now we need to use index-related configurations when reading.
Could we consider addressing this problem in a more general way:

  1. moving the configurations that are currently written to the configuration that determines the layout of the file and that depend on those configurations for reads at read time to the table-level configuration?
  2. Or, a simpler way to do this is to put these write configurations into the hms and get them automatically when you read table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S PR with lines of changes in (10, 100]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants