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


##########
hudi-client/hudi-java-client/src/test/java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java:
##########
@@ -941,14 +942,10 @@ private void verifyMetadataRawRecords(HoodieTable table, 
List<HoodieLogFile> log
    * @param metadataMetaClient    - Metadata table meta client
    * @param logFiles              - Metadata table log files
    * @param latestCommitTimestamp
-   * @param enableMetaFields      - Enable meta fields
    */
   private void verifyMetadataMergedRecords(HoodieTableMetaClient 
metadataMetaClient, List<HoodieLogFile> logFiles,
-                                           String latestCommitTimestamp, 
boolean enableMetaFields) {
-    Schema schema = 
HoodieAvroUtils.addMetadataFields(HoodieMetadataRecord.getClassSchema());
-    if (enableMetaFields) {

Review Comment:
   I see that `testMetadataRecordKeyExcludeFromPayloadArgs` has false for this.
   
   This path is not executed at all IIUC? If so, let's leave the logic in there 
and clean it up in a separate PR. 



##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/util/OrderingValueEngineTypeConverter.java:
##########
@@ -46,16 +48,16 @@ public Comparable convert(Comparable value) {
         : this.converters.get(0).apply(value);
   }
 
-  public static List<Function<Comparable, Comparable>> createConverters(Schema 
dataSchema, List<String> orderingFieldNames, boolean utcTimezone) {
+  public static List<Function<Comparable, Comparable>> 
createConverters(HoodieSchema dataSchema, List<String> orderingFieldNames, 
boolean utcTimezone) {
     if (orderingFieldNames.isEmpty()) {
       return Collections.singletonList(Function.identity());
     }
     return orderingFieldNames.stream().map(f -> {
-      Option<Schema> fieldSchemaOpt = 
AvroSchemaUtils.findNestedFieldSchema(dataSchema, f, true);
+      Option<HoodieSchema> fieldSchemaOpt = 
HoodieSchemaUtils.getNestedField(dataSchema, 
f).map(Pair::getValue).map(HoodieSchemaField::getNonNullSchema);

Review Comment:
   I am porting over `findNestedFieldSchema` in this PR: 
https://github.com/apache/hudi/pull/17546
   
   We can swap tis out to use `HoodieSchemaUtils` later.



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