danny0405 commented on code in PR #18058:
URL: https://github.com/apache/hudi/pull/18058#discussion_r2772088987
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieCreateRecordUtils.scala:
##########
@@ -153,8 +153,17 @@ object HoodieCreateRecordUtils {
val orderingVal = OrderingValues.create(
orderingFields,
JFunction.toJavaFunction[String, Comparable[_]](
- field => HoodieAvroUtils.getNestedFieldVal(avroRec, field,
false,
-
consistentLogicalTimestampEnabled).asInstanceOf[Comparable[_]]))
+ field => {
+ val fieldVal = HoodieAvroUtils.getNestedFieldVal(avroRec,
field, false,
+ consistentLogicalTimestampEnabled)
+ if (fieldVal == null) {
+ throw new IllegalArgumentException(
+ s"Precombine/ordering field '$field' has null value
for record key '${hoodieKey.getRecordKey}'. " +
Review Comment:
`Precombine` notion is deprecated since 1.1, let's just call it `Ordering
field` ?
--
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]