lokeshj1703 commented on code in PR #12935:
URL: https://github.com/apache/hudi/pull/12935#discussion_r1986731909


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieBaseFileGroupRecordBuffer.java:
##########
@@ -424,8 +424,10 @@ protected Option<T> merge(Option<T> older, Map<String, 
Object> olderInfoMap,
           }
           Comparable oldOrderingValue = readerContext.getOrderingValue(
               older, olderInfoMap, readerSchema, orderingFieldName);
-          if (!isDeleteRecordWithNaturalOrder(older, oldOrderingValue)
-              && oldOrderingValue.compareTo(newOrderingValue) > 0) {
+          boolean choosePrev = !oldOrderingValue.equals(0)
+              && ReflectionUtils.isSameClass(oldOrderingValue, 
newOrderingValue)

Review Comment:
   @linliu-code @nsivabalan I brought the change from table version 6. When I 
am trying to use the file group reader with table version 6, I am running into 
class cast exception.
   Long to int conversion and int to long conversion related errors are seen in 
tests.  DEFAULT_ORDERING_VALUE is of int type so that fails when checking with 
ordering value of type long.
   This check is still intact - `oldOrderingValue.compareTo(newOrderingValue) > 
0`
   `testPrunedFiltered` was one of the tests which was failing.



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