danny0405 commented on code in PR #13987:
URL: https://github.com/apache/hudi/pull/13987#discussion_r2387487157
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderOnSpark.scala:
##########
@@ -116,8 +118,18 @@ 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))
+ .filter(r => r.isPresent).map(r => {
+ val data = r.get.getData
+ if (data.isInstanceOf[SerializableIndexedRecord])
+ {
+ // accessing a field to trigger deser of indexed record
+ data.get(0)
Review Comment:
same as above: have some utility method for such eager deser.
--
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]