This is an automated email from the ASF dual-hosted git repository. danny0405 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push: new 7f60243009a [MINOR] Reduce unnecessary code paths (#11729) 7f60243009a is described below commit 7f60243009a1da6320ef486a89e7f4615ef12481 Author: TheR1sing3un <87409330+ther1sing...@users.noreply.github.com> AuthorDate: Wed Aug 7 07:56:16 2024 +0800 [MINOR] Reduce unnecessary code paths (#11729) --- .../org/apache/hudi/table/action/commit/HoodieMergeHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java index bca817a093e..f7b93b59457 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java @@ -96,13 +96,13 @@ public class HoodieMergeHelper<T> extends BaseMergeHelper { // Check whether the writer schema is simply a projection of the file's one, ie // - Its field-set is a proper subset (of the reader schema) // - There's no schema evolution transformation necessary - boolean isPureProjection = isStrictProjectionOf(readerSchema, writerSchema) - && !schemaEvolutionTransformerOpt.isPresent(); + boolean isPureProjection = schemaEvolutionTransformerOpt.isEmpty() + && isStrictProjectionOf(readerSchema, writerSchema); // Check whether we will need to rewrite target (already merged) records into the // writer's schema - boolean shouldRewriteInWriterSchema = writeConfig.shouldUseExternalSchemaTransformation() - || !isPureProjection - || baseFile.getBootstrapBaseFile().isPresent(); + boolean shouldRewriteInWriterSchema = !isPureProjection + || baseFile.getBootstrapBaseFile().isPresent() + || writeConfig.shouldUseExternalSchemaTransformation(); HoodieExecutor<Void> executor = null;