alexeykudinkin commented on code in PR #5378:
URL: https://github.com/apache/hudi/pull/5378#discussion_r855334576
##########
hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala:
##########
@@ -332,10 +390,33 @@ class Spark32HoodieParquetFileFormat(private val
shouldAppendPartitionValues: Bo
}
}
}
+
}
object Spark32HoodieParquetFileFormat {
+ private def createParquetFilters(args: Any*): ParquetFilters = {
+ // NOTE: ParquetFilters ctor args contain Scala enum, therefore we can't
look it
+ // up by arg types, and have to instead rely on relative order of
ctors
+ val ctor = classOf[ParquetFilters].getConstructors.head
+ ctor.newInstance(args.map(_.asInstanceOf[AnyRef]): _*)
+ .asInstanceOf[ParquetFilters]
Review Comment:
Good call
--
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]