aokolnychyi commented on code in PR #53202:
URL: https://github.com/apache/spark/pull/53202#discussion_r2558471025


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/util/SchemaUtils.scala:
##########
@@ -396,4 +392,141 @@ private[spark] object SchemaUtils {
     case st: StringType => StringHelper.removeCollation(st)
     case _ => dt
   }
+
+  /**
+   * Validates schema compatibility by recursively checking type and 
nullability changes.
+   *
+   * @param schema the schema to validate against
+   * @param otherSchema the other schema to check for compatibility
+   * @param resolver the resolver that controls whether the validation is case 
sensitive
+   * @param mode the validation mode that controls what changes are allowed
+   * @return sequence of error messages describing incompatibilities, empty if 
fully compatible
+   */
+  def validateSchemaCompatibility(

Review Comment:
   This also shows error for each nested field, like discussed earlier.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/util/SchemaUtils.scala:
##########
@@ -396,4 +392,141 @@ private[spark] object SchemaUtils {
     case st: StringType => StringHelper.removeCollation(st)
     case _ => dt
   }
+
+  /**
+   * Validates schema compatibility by recursively checking type and 
nullability changes.
+   *
+   * @param schema the schema to validate against
+   * @param otherSchema the other schema to check for compatibility
+   * @param resolver the resolver that controls whether the validation is case 
sensitive
+   * @param mode the validation mode that controls what changes are allowed
+   * @return sequence of error messages describing incompatibilities, empty if 
fully compatible
+   */
+  def validateSchemaCompatibility(

Review Comment:
   This also shows errors for each nested field, like discussed earlier.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to