dbtsai commented on a change in pull request #27728:
[SPARK-25556][SPARK-17636][SPARK-31026][SPARK-31060][SQL][test-hive1.2] Nested
Column Predicate Pushdown for Parquet
URL: https://github.com/apache/spark/pull/27728#discussion_r398310277
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
##########
@@ -121,43 +121,81 @@ abstract class ParquetFilterSuite extends QueryTest with
ParquetTest with Shared
checkBinaryFilterPredicate(predicate, filterClass, Seq(Row(expected)))(df)
}
+ /**
+ * Takes single level `inputDF` dataframe to generate multi-level nested
+ * dataframes as new test data.
+ */
+ private def withNestedDataFrame(inputDF: DataFrame)
Review comment:
Okay, this is not easy since one of the test case is like
```scala
val dataFrame = spark.createDataFrame(rdd, StructType.fromDDL(s"a
decimal($precision, 2)"))
withNestedDataFrame(dataFrame) { case (inputDF, pushDownColName,
resultFun) =>
withParquetDataFrame(inputDF) { implicit df =>
val decimalAttr: Expression = df(pushDownColName).expr
assert(df(pushDownColName).expr.dataType ===
DecimalType(precision, 2))
```
, so the dataframe can not be constructed directly from
`withNestedDataFrame[T](data: Seq[T])`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]