the-other-tim-brown commented on code in PR #13526:
URL: https://github.com/apache/hudi/pull/13526#discussion_r2224119631
##########
hudi-common/src/main/avro/HoodieDeleteRecordList.avsc:
##########
@@ -54,17 +54,23 @@
"doc": "Ordering value determining the order of merging on the
same key",
"type": [
"null",
- "org.apache.hudi.avro.model.BooleanWrapper",
- "org.apache.hudi.avro.model.IntWrapper",
- "org.apache.hudi.avro.model.LongWrapper",
- "org.apache.hudi.avro.model.FloatWrapper",
- "org.apache.hudi.avro.model.DoubleWrapper",
- "org.apache.hudi.avro.model.BytesWrapper",
- "org.apache.hudi.avro.model.StringWrapper",
- "org.apache.hudi.avro.model.DateWrapper",
- "org.apache.hudi.avro.model.DecimalWrapper",
- "org.apache.hudi.avro.model.TimeMicrosWrapper",
- "org.apache.hudi.avro.model.TimestampMicrosWrapper"
+ {
+ "type": "array",
Review Comment:
This is not a safe schema evolution. We need to be able to read the log
files of records written by previous Hudi releases.
##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -380,21 +380,23 @@ private BiFunction<T, Schema, String>
virtualKeyExtractor(String[] recordKeyFiel
/**
* Gets the ordering value in particular type.
*
- * @param record An option of record.
- * @param schema The Avro schema of the record.
- * @param orderingFieldName name of the ordering field
+ * @param record An option of record.
+ * @param schema The Avro schema of the record.
+ * @param orderingFieldNames name of the ordering field
* @return The ordering value.
*/
public Comparable getOrderingValue(T record,
Schema schema,
- Option<String> orderingFieldName) {
- if (orderingFieldName.isEmpty()) {
- return DEFAULT_ORDERING_VALUE;
+ Option<List<String>> orderingFieldNames) {
Review Comment:
Would it be simpler to just use an empty list instead of an empty option
when there are are no ordering fields specified?
--
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]