the-other-tim-brown commented on code in PR #9834:
URL: https://github.com/apache/hudi/pull/9834#discussion_r1350512605
##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/TestSourceFormatAdapter.java:
##########
@@ -136,16 +146,23 @@ public void testJsonSanitization(String
unsanitizedDataFile, String sanitizedDat
public static class TestRowDataSource extends Source<Dataset<Row>> {
private final InputBatch<Dataset<Row>> batch;
+ private final SanitizationUtils rowSanitizer;
public TestRowDataSource(TypedProperties props, JavaSparkContext
sparkContext, SparkSession sparkSession,
SchemaProvider schemaProvider,
InputBatch<Dataset<Row>> batch) {
super(props, sparkContext, sparkSession, schemaProvider, SourceType.ROW);
this.batch = batch;
+ this.rowSanitizer = new SanitizationUtils();
}
@Override
protected InputBatch<Dataset<Row>> fetchNewData(Option<String>
lastCkptStr, long sourceLimit) {
- return batch;
+ return batch.getBatch().map(dsr -> {
+ Dataset<Row> tranformed =
SanitizationUtils.sanitizeColumnNamesForAvro(dsr, getInvalidCharMask(props));
Review Comment:
or should we have this test class just override `fetchNextBatch`?
--
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]