wombatu-kun commented on code in PR #19164:
URL: https://github.com/apache/hudi/pull/19164#discussion_r3878872424
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/HoodieSparkValidateDuplicateKeyRecordMerger.scala:
##########
@@ -28,9 +28,13 @@ import org.apache.hudi.exception.HoodieDuplicateKeyException
import
org.apache.spark.sql.hudi.command.HoodieSparkValidateDuplicateKeyRecordMerger.STRATEGY_ID
/**
- * Validate the duplicate key for insert statement without enable the
INSERT_DROP_DUPS_OPT
- * config.
- * @see org.apache.spark.sql.hudi.command.ValidateDuplicateKeyPayload
+ * Merger that rejects every merge with a [[HoodieDuplicateKeyException]], for
INSERT statements that must fail on a
+ * duplicate key rather than drop or update it.
+ *
+ * No in-repo code path instantiates it since #12588 removed its wiring
together with `ValidateDuplicateKeyPayload`
Review Comment:
In `ProvidesHoodieConfig` this merger only ever appeared as a TODO beside
the `ValidateDuplicateKeyPayload` selection that #12588 deleted, so it has had
no instantiation site since it was added rather than since #12588. Suggest
rewording to say it was never wired, here and in the PR body.
##########
hudi-spark-datasource/hudi-spark/src/main/java/org/apache/hudi/cli/SchemaProvider.java:
##########
@@ -73,8 +73,9 @@ public HoodieSchema getTargetHoodieSchema() {
Schema schema = getTargetSchema();
return schema == null ? null : HoodieSchema.fromAvroSchema(schema);
} catch (UnsupportedOperationException e) {
- // If the legacy getTargetSchema() calls getSourceSchema() which is not
implemented,
- // fall back to using getSourceHoodieSchema as target schema
+ // Reached by a provider that overrides getSourceHoodieSchema() and
leaves the deprecated
Review Comment:
The class javadoc on `SchemaProvider` still says it is "used by Hudi
Streamer", which `TestCliSchemaProvider`'s own javadoc now contradicts. Suggest
correcting it to the CLI bootstrap path while this file is open.
--
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]