Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9659#discussion_r47059656
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
 ---
    @@ -50,27 +50,33 @@ class ParquetFilterSuite extends QueryTest with 
ParquetTest with SharedSQLContex
         val output = predicate.collect { case a: Attribute => a }.distinct
     
         withSQLConf(SQLConf.PARQUET_FILTER_PUSHDOWN_ENABLED.key -> "true") {
    -      val query = df
    -        .select(output.map(e => Column(e)): _*)
    -        .where(Column(predicate))
    -
    -      val maybeAnalyzedPredicate = 
query.queryExecution.optimizedPlan.collect {
    -        case PhysicalOperation(_, filters, LogicalRelation(_: 
ParquetRelation, _)) => filters
    -      }.flatten.reduceLeftOption(_ && _)
    -      assert(maybeAnalyzedPredicate.isDefined)
    -
    -      val selectedFilters = 
maybeAnalyzedPredicate.flatMap(DataSourceStrategy.translateFilter)
    -      assert(selectedFilters.nonEmpty)
    -
    -      selectedFilters.foreach { pred =>
    -        val maybeFilter = ParquetFilters.createFilter(df.schema, pred)
    -        assert(maybeFilter.isDefined, s"Couldn't generate filter predicate 
for $pred")
    -        maybeFilter.foreach { f =>
    -          // Doesn't bother checking type parameters here (e.g. 
`Eq[Integer]`)
    -          assert(f.getClass === filterClass)
    +      withSQLConf(SQLConf.PARQUET_UNSAFE_ROW_RECORD_READER_ENABLED.key -> 
"false") {
    --- End diff --
    
    I see. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to