alexeykudinkin commented on code in PR #7802:
URL: https://github.com/apache/hudi/pull/7802#discussion_r1092558919


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -518,14 +518,17 @@ object HoodieSparkSqlWriter {
   }
 
   def addSchemaEvolutionParameters(parameters: Map[String, String], 
internalSchemaOpt: Option[InternalSchema], writeSchemaOpt: Option[Schema] = 
None): Map[String, String] = {
-    val schemaEvolutionEnable = if (internalSchemaOpt.isDefined) "true" else 
"false"
+    val schemaEvolutionEnabled = if (internalSchemaOpt.isDefined) "true" else 
"false"
+    val schemaReconciliationEnabled = 
parameters.getOrDefault(DataSourceWriteOptions.RECONCILE_SCHEMA.key(),
+      
DataSourceWriteOptions.RECONCILE_SCHEMA.defaultValue().toString).toBoolean
 
-    val schemaValidateEnable = if (schemaEvolutionEnable.toBoolean && 
parameters.getOrDefault(DataSourceWriteOptions.RECONCILE_SCHEMA.key(), 
"false").toBoolean) {
-      // force disable schema validate, now we support schema evolution, no 
need to do validate
-      "false"
+    // Force disable schema validate, now we support schema evolution, no need 
to do validate
+    val schemaValidationEnabledOpt = if (schemaEvolutionEnabled.toBoolean && 
schemaReconciliationEnabled) {
+      Some(false)
     } else  {
-      
parameters.getOrDefault(HoodieWriteConfig.AVRO_SCHEMA_VALIDATE_ENABLE.key(), 
"true")

Review Comment:
   This is the reason we didn't see any tests failing -- we're overriding it to 
always be true (unless specified)



-- 
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]

Reply via email to