jonvex commented on code in PR #12283:
URL: https://github.com/apache/hudi/pull/12283#discussion_r1850728799
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/functional/TestHoodieSparkMergeOnReadTableInsertUpdateDelete.java:
##########
@@ -264,11 +263,11 @@ public void testRepeatedRollbackOfCompaction() throws
Exception {
}
}
- @Disabled("HUDI-8203")
@ParameterizedTest
@ValueSource(booleans = {true, false})
public void testSimpleInsertUpdateAndDelete(boolean populateMetaFields)
throws Exception {
Properties properties = populateMetaFields ? new Properties() :
getPropertiesForKeyGen();
+ properties.setProperty(HoodieTableConfig.PRECOMBINE_FIELD.key(),
"timestamp");
Review Comment:
the test data gen creates the record with an ordering field of type long. If
precombine is not set, then we default to int in the filegroup reader. So then
when we read the records we try to cast the long to an int which fails.
timestamp field is long, so then we don't need to do any casting.
```
public RawTripTestPayload(String jsonData, String rowKey, String
partitionPath, String schemaStr) throws IOException {
this(Option.of(jsonData), rowKey, partitionPath, schemaStr, false, 0L);
}
```
What is also interesting is that there are 3 more constructors for
RawTripTestPayload. 2 of them take in any Comparable as the ordering value. The
final one sets it as an int:
```
this.orderingVal = Integer.valueOf(jsonRecordMap.getOrDefault("number",
0L).toString());
```
--
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]