[ https://issues.apache.org/jira/browse/HUDI-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17396447#comment-17396447 ]
ASF GitHub Bot commented on HUDI-1129: -------------------------------------- nsivabalan commented on a change in pull request #2927: URL: https://github.com/apache/hudi/pull/2927#discussion_r685700986 ########## File path: hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/HoodieSparkUtils.scala ########## @@ -92,22 +92,43 @@ object HoodieSparkUtils extends SparkAdapterSupport { new InMemoryFileIndex(sparkSession, globbedPaths, Map(), Option.empty, fileStatusCache) } - def createRdd(df: DataFrame, structName: String, recordNamespace: String): RDD[GenericRecord] = { - val avroSchema = AvroConversionUtils.convertStructTypeToAvroSchema(df.schema, structName, recordNamespace) - createRdd(df, avroSchema, structName, recordNamespace) + def createRdd(df: DataFrame, structName: String, recordNamespace: String, reconcileToLatestSchema: Boolean, latestTableSchema: + org.apache.hudi.common.util.Option[Schema] = org.apache.hudi.common.util.Option.empty()): RDD[GenericRecord] = { + val dfWriteSchema = AvroConversionUtils.convertStructTypeToAvroSchema(df.schema, structName, recordNamespace) + var writeSchema : Schema = null; + var toReconcileSchema : Schema = null; + if (reconcileToLatestSchema && latestTableSchema.isPresent) { Review comment: With some of the callers, we just fetch the reconcileSchema config and pass it in as is. So, caller passes last 2 args as is. And hence there are chances that reconcileToLatestSchema is false, but latestTableSchema is present. -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > AvroConversionUtils unable to handle avro to row transformation when passing > evolved schema > -------------------------------------------------------------------------------------------- > > Key: HUDI-1129 > URL: https://issues.apache.org/jira/browse/HUDI-1129 > Project: Apache Hudi > Issue Type: Bug > Components: DeltaStreamer > Reporter: Balaji Varadarajan > Assignee: Sagar Sumit > Priority: Blocker > Labels: pull-request-available, sev:critical, user-support-issues > Fix For: 0.9.0 > > > Unit test to repro : > [https://github.com/apache/hudi/pull/1844/files#diff-2c3763c5782af9c3cbc02e2935211587R476] > Context in : > [https://github.com/apache/hudi/issues/1845#issuecomment-665180775] (issue 2) -- This message was sent by Atlassian Jira (v8.3.4#803005)