vinothchandar commented on a change in pull request #1518: [HUDI-723] Register avro schema if infered from SQL transformation URL: https://github.com/apache/incubator-hudi/pull/1518#discussion_r409840574
########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java ########## @@ -296,10 +296,21 @@ private void refreshTimeline() throws IOException { // Use Transformed Row's schema if not overridden. If target schema is not specified // default to RowBasedSchemaProvider - schemaProvider = this.schemaProvider == null || this.schemaProvider.getTargetSchema() == null - ? transformed.map(r -> (SchemaProvider) new RowBasedSchemaProvider(r.schema())).orElse( - dataAndCheckpoint.getSchemaProvider()) - : this.schemaProvider; + if (this.schemaProvider == null) { + schemaProvider = + transformed + .map(r -> (SchemaProvider) new RowBasedSchemaProvider(r.schema())) + .orElse(dataAndCheckpoint.getSchemaProvider()); + } else if (this.schemaProvider.getTargetSchema() == null) { + schemaProvider = Review comment: is n't this block the same as above? why break it up into an else-if? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services