harsh1231 commented on a change in pull request #4404:
URL: https://github.com/apache/hudi/pull/4404#discussion_r776611838
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/execution/bulkinsert/RDDCustomColumnsSortPartitioner.java
##########
@@ -55,8 +55,17 @@ public RDDCustomColumnsSortPartitioner(String[] columnNames,
Schema schema) {
final String[] sortColumns = this.sortColumnNames;
final SerializableSchema schema = this.serializableSchema;
return records.sortBy(
- record -> HoodieAvroUtils.getRecordColumnValues(record, sortColumns,
schema),
+ record -> {
+ Object recordValue = HoodieAvroUtils.getRecordColumnValues(record,
sortColumns, schema);
+ // null values are replaced with empty string for null_first order
+ if (recordValue == null) {
+ return "";
Review comment:
`add another parameter to replace nulls by user-defined value` not sure
we need that as of now
@codope
--
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]