szehon-ho commented on code in PR #5409:
URL: https://github.com/apache/iceberg/pull/5409#discussion_r937177833


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkSchemaUtil.java:
##########
@@ -196,6 +196,30 @@ public static Schema convert(Schema baseSchema, StructType 
sparkType) {
     return SparkFixupTypes.fixup(schema, baseSchema);
   }
 
+  /**
+   * Convert a Spark {@link StructType struct} to a {@link Schema} based on 
the given schema.
+   *
+   * <p>This conversion does not assign new ids; it uses ids from the base 
schema.
+   *
+   * <p>Data types, field order, and nullability will match the spark type. 
This conversion may
+   * return a schema that is not compatible with base schema.
+   *
+   * @param baseSchema a Schema on which conversion is based
+   * @param sparkType a Spark StructType
+   * @param caseSensitive when false, the case of schema fields is ignored
+   * @return the equivalent Schema
+   * @throws IllegalArgumentException if the type cannot be converted or there 
are missing ids
+   */
+  public static Schema convert(Schema baseSchema, StructType sparkType, 
boolean caseSensitive) {

Review Comment:
   Just saw this one, same comment, can we redirect the original form of these 
two methods as well (convert and convertWithFreshIds)



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