nsivabalan commented on code in PR #13987:
URL: https://github.com/apache/hudi/pull/13987#discussion_r2389981597
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderOnSpark.scala:
##########
@@ -116,8 +118,11 @@ class TestHoodieFileGroupReaderOnSpark extends
TestHoodieFileGroupReaderBase[Int
options: util.Map[String, String],
schemaStr: String): Unit = {
val schema = new Schema.Parser().parse(schemaStr)
- val genericRecords =
spark.sparkContext.parallelize(recordList.asScala.map(_.toIndexedRecord(schema,
CollectionUtils.emptyProps))
- .filter(r => r.isPresent).map(r =>
r.get.getData.asInstanceOf[GenericRecord]).toSeq, 2)
+ val genericRecords : RDD[GenericRecord] =
spark.sparkContext.parallelize(recordList.asScala.map(_.toIndexedRecord(schema,
CollectionUtils.emptyProps))
Review Comment:
I have tried to reuse the method we have in `TestHoodieFileGroupReaderBase`
here.
we can't move it to SparkDatasetMixin, since SparkDatasetMixin is meant for
spark. while methods on `TestHoodieFileGroupReaderBase` is also required for
other record types.
--
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]