Raymond Xu created HUDI-6164:
--------------------------------

             Summary: Create new version for RawTripTestPayload to avoid misuse
                 Key: HUDI-6164
                 URL: https://issues.apache.org/jira/browse/HUDI-6164
             Project: Apache Hudi
          Issue Type: Improvement
            Reporter: Raymond Xu


org.apache.hudi.common.testutils.HoodieTestDataGenerator has been omitting 
ordering value when creating RawTripTestPayload, as a result, the records 
generated are not usable for merging. This involves these 2 constructors


{code:java}
org.apache.hudi.common.testutils.RawTripTestPayload#RawTripTestPayload(org.apache.hudi.common.util.Option<java.lang.String>,
 java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, 
java.lang.Comparable)
org.apache.hudi.common.testutils.RawTripTestPayload#RawTripTestPayload(java.lang.String,
 java.lang.String, java.lang.String, java.lang.String)
{code}


On the other hand, there are test cases construct RawTripTestPayload with json 
data directly and fix the partition field as `time` using this constructor

{code:java}
org.apache.hudi.common.testutils.RawTripTestPayload#RawTripTestPayload(java.lang.String)
{code}

These are contradicting usage of this class. We should create another payload 
class for the 2nd use case (fixed simple schema). And make RawTripTestPayload 
support setting ordering value with HoodieTestDataGenerator.





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to