voonhous commented on code in PR #19809: URL: https://github.com/apache/hudi/pull/19809#discussion_r3921266731
########## hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaUtils.java: ########## @@ -24,34 +24,60 @@ import org.apache.hudi.common.schema.internal.HoodieSchemaException; import org.apache.hudi.common.util.Option; import org.apache.hudi.common.util.ValidationUtils; +import org.apache.hudi.common.util.VisibleForTesting; import org.apache.hudi.common.util.collection.Pair; import org.apache.hudi.exception.HoodieException; import org.apache.avro.JsonProperties; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.function.Function; import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.stream.Stream; /** - * Utility class for HoodieSchema operations including table schema manipulation, - * compatibility checking, and schema evolution operations. + * HoodieSchema-typed structural transforms of table schemas and of the well-known Hudi record shapes. * - * <p>This class provides HoodieSchema equivalents of operations found in AvroSchemaUtils - * and HoodieAvroUtils, focusing on table schema management rather than record-level operations.</p> + * <p>What lives here:</p> Review Comment: Reworked in 173cef432361: added `createHoodieWriteSchema`, `createNewSchemaFromFieldsWithReference`, the `createNewSchemaField` copy factory (with the two aliases noted), `toJavaDefaultValue`, `getRecordQualifiedName` and `hasDecimalField`; `getNestedField` and `getFieldSchema` now sit under "questions about a single schema" as facades over the `HoodieSchema` instance methods. Still unlisted on purpose: `addMetadataColumnTypes` (test-only), `createSchemaErrorString`, and `createNullableSchema`, which the delegation paragraph already covers. -- 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]
