voonhous commented on code in PR #17691:
URL: https://github.com/apache/hudi/pull/17691#discussion_r2645717983
##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestSortUtils.java:
##########
@@ -77,7 +78,7 @@ record = new HoodieAvroRecord(new HoodieKey("record1",
"partition1"), payload);
record = new TestSparkRecord(new HoodieKey("record1", "partition1"),
payload);
}
String[] userSortColumns = new String[] {"non_pii_col", "timestamp"};
- FlatLists.ComparableList<Comparable<HoodieRecord>> comparableList =
SortUtils.getComparableSortColumns(record, userSortColumns,
Schema.parse(SCHEMA), suffixRecordKey, true);
+ FlatLists.ComparableList<Comparable<HoodieRecord>> comparableList =
SortUtils.getComparableSortColumns(record, userSortColumns,
HoodieSchema.parse(SCHEMA), suffixRecordKey, true);
Review Comment:
Nit: We can use HoodieSchema to parse the `SCHEMA` string to a
`HoodieSchema`, after which, we can remove the importation of
`org.apache.avro.Schema`.
##########
hudi-common/src/main/java/org/apache/hudi/common/util/CommitUtils.java:
##########
@@ -49,7 +50,7 @@
public class CommitUtils {
private static final Logger LOG = LoggerFactory.getLogger(CommitUtils.class);
- private static final String NULL_SCHEMA_STR =
Schema.create(Schema.Type.NULL).toString();
+ private static final String NULL_SCHEMA_STR =
HoodieSchema.create(HoodieSchemaType.NULL).toString();
Review Comment:
`HoodieSchema.create(HoodieSchemaType.NULL)` seems to be used in quite a few
places, possible for us to just make this a public constant somewhere where we
can just import this to the other relevant classes?
--
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]