voonhous commented on code in PR #19809:
URL: https://github.com/apache/hudi/pull/19809#discussion_r3916146578


##########
hudi-common/src/main/java/org/apache/hudi/common/avro/HoodieAvroUtils.java:
##########
@@ -883,15 +923,15 @@ private static Object 
normalizeAvroLogicalTypeToPrimitive(Object value, Schema s
    *
    * @param record  Hoodie record.
    * @param columns Names of the columns to get values.
-   * @param schema  {@link Schema} instance.
+   * @param schema  {@link HoodieSchema} instance.
    * @return Column value.
    */
   public static Object[] getRecordColumnValues(HoodieRecord record,
                                                String[] columns,
-                                               Schema schema,
+                                               HoodieSchema schema,
                                                boolean 
consistentLogicalTimestampEnabled) {
     try {
-      GenericRecord genericRecord = (GenericRecord) 
(record.toIndexedRecord(HoodieAvroSchemaCache.intern(schema), new 
Properties()).get()).getData();
+      GenericRecord genericRecord = (GenericRecord) 
(record.toIndexedRecord(schema, new Properties()).get()).getData();

Review Comment:
   Done in 23a1729823fb: `getRecordColumnValues` interns through 
`HoodieSchemaCache` again, so the canonical instance reaches 
`BaseAvroPayload#getRecord` as before.



##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaUtils.java:
##########
@@ -779,7 +799,8 @@ public static boolean hasDecimalField(HoodieSchema schema) {
    * @param schema the input schema to search
    * @return true if the schema contains a small precision decimal field and 
false otherwise
    */
-  public static boolean hasSmallPrecisionDecimalField(HoodieSchema schema) {
+  @VisibleForTesting
+  static boolean hasSmallPrecisionDecimalField(HoodieSchema schema) {

Review Comment:
   Done in 1812ee46ad8d: both methods and `testHasSmallPrecisionDecimalField` 
deleted; `hasDecimalWithCondition` folded into `hasDecimalField` since the 
predicate had one remaining value.



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