nsivabalan commented on code in PR #19205:
URL: https://github.com/apache/hudi/pull/19205#discussion_r3573054762
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/IncrementalRelationV1.scala:
##########
@@ -89,8 +88,9 @@ class IncrementalRelationV1(val sqlContext: SQLContext,
s"option ${DataSourceReadOptions.START_COMMIT.key}")
}
- if (!metaClient.getTableConfig.populateMetaFields()) {
- throw new HoodieException("Incremental queries are not supported when meta
fields are disabled")
+ if (!metaClient.getTableConfig.isCommitTimePopulated()) {
+ throw new HoodieException("Incremental queries are not supported when
_hoodie_commit_time is not populated. "
+ + "Either keep hoodie.populate.meta.fields=true or include
_hoodie_commit_time in hoodie.meta.fields.mode.")
Review Comment:
Addressed in
[cfd1fea706ed](https://github.com/apache/hudi/pull/19205/commits/cfd1fea706edee5d245201f057cd8755e724d9af):
extended the error message in `IncrementalRelationV1` /
`IncrementalRelationV2` to state that `hoodie.meta.fields.mode` is a
physical-storage decision baked into files at write time — it cannot be flipped
by changing writer options later, and a table that was created without
`_hoodie_commit_time` populated must be recreated to enable incremental
queries. The runtime-immutability guard in
`HoodieWriterUtils.validateTableConfig` blocks silent flips (both `null →
non-empty` and `non-empty → different`) with a message pointing at the CLI /
upgrade path. The follow-up CLI PR
([#19206](https://github.com/apache/hudi/pull/19206)) adds `table
set-meta-fields-mode` as the sanctioned mutation path with a `--force` guard
for tables that already have commits.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]