You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2026/06/25 03:41:20 UTC
Re: [I] Introduce config to Return the original partition value from parquet when using CustomKeyGenerator [hudi]
nsivabalan commented on issue #16457:
URL: https://github.com/apache/hudi/issues/16457#issuecomment-4795607678
This appears to be addressed on master by [PR #17850](https://github.com/apache/hudi/pull/17850) (commit `1203b215b03c`, _"feat: Use PartitionValueExtractor interface in Spark reader path"_, since 1.2.0).
The fix introduces:
- New read config `hoodie.datasource.read.partition.value.extractor.enabled` (default `false`) — when enabled, the Spark reader uses a `PartitionValueExtractor` to parse partition values from the partition path instead of relying on Spark's default path parsing.
- Writer/table properties `hoodie.datasource.partition_extractor_class` and `hoodie.table.partition_extractor_class` so the extractor class is persisted in `hoodie.properties` and reused on read.
- The `PartitionValueExtractor` interface was promoted from `hudi-sync-common` to `hudi-common` so it's accessible from the reader path.
This lets users with a `CustomKeyGenerator` that transforms partition values (e.g., `TIMESTAMP` formatting) supply a matching `PartitionValueExtractor` that inverts the transformation and returns the original value at read time. End-to-end coverage is in `TestCustomParitionValueExtractor` (`hudi-spark-datasource/hudi-spark/src/test/scala/.../TestCustomParitionValueExtractor.scala`).
If this resolves your scenario, please close the issue. If you specifically need the partition value to be read **directly from the parquet file** (rather than recovered via an extractor), please reopen with that distinction called out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org