codope commented on code in PR #11154: URL: https://github.com/apache/hudi/pull/11154#discussion_r1609536039
########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSchemaUtils.scala: ########## @@ -93,14 +93,14 @@ object HoodieSchemaUtils { // in the table's one we want to proceed aligning nullability constraints w/ the table's schema // Also, we promote types to the latest table schema if possible. val shouldCanonicalizeSchema = opts.getOrElse(CANONICALIZE_SCHEMA.key, CANONICALIZE_SCHEMA.defaultValue.toString).toBoolean + val shouldReconcileSchema = opts.getOrElse(DataSourceWriteOptions.RECONCILE_SCHEMA.key(), + DataSourceWriteOptions.RECONCILE_SCHEMA.defaultValue().toString).toBoolean val canonicalizedSourceSchema = if (shouldCanonicalizeSchema) { - canonicalizeSchema(sourceSchema, latestTableSchema, opts) + canonicalizeSchema(sourceSchema, latestTableSchema, opts, !shouldReconcileSchema) Review Comment: Reconcile is not necessarily dependent on schema on read. I think the reason might have been to not conflict schema reconciliation rules incase that is enabled. @jonvex to clarify. Whatever be the reason, let's add a comment for reference. -- 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