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

    https://github.com/apache/spark/pull/10362#discussion_r48016024
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcHadoopFsRelationSuite.scala
 ---
    @@ -60,4 +61,23 @@ class OrcHadoopFsRelationSuite extends 
HadoopFsRelationTest {
               "dataSchema" -> 
dataSchemaWithPartition.json)).format(dataSourceName).load())
         }
       }
    +
    +  test("SPARK-12218: 'Not' is included in ORC filter pushdown") {
    +    import testImplicits._
    +
    +    withSQLConf(SQLConf.ORC_FILTER_PUSHDOWN_ENABLED.key -> "true") {
    +      withTempPath { dir =>
    +        val path = s"${dir.getCanonicalPath}/table1"
    +        (1 to 5).map(i => (i, (i%2).toString)).toDF("a", 
"b").write.orc(path)
    +
    +        checkAnswer(
    +          sqlContext.read.orc(path).where("not (a = 2) or not(b in 
('1'))"),
    +          (1 to 5).map(i => Row(i, (i%2).toString)))
    +
    +        checkAnswer(
    +          sqlContext.read.orc(path).where("not (a = 2 and b in ('1'))"),
    +          (1 to 5).map(i => Row(i, (i%2).toString)))
    --- End diff --
    
    Same as above.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to