https://github.com/apache/spark
Revision a5f14f4b454d99e04118a10b9a579375114c3c25 authored by zzzzming95 on 03 August 2022, 12:22:55 UTC, committed by Hyukjin Kwon on 03 August 2022, 12:23:32 UTC
### What changes were proposed in this pull request?

fix `BinaryFileFormat` filter push down bug.

Before modification, when Filter tree is:
````
-Not
- - IsNotNull
````

Since `IsNotNull` cannot be matched, `IsNotNull` will return a result that is always true (that is, `case _ => (_ => true)`), that is, no filter pushdown is performed. But because there is still a `Not`, after negation, it will return a result that is always False, that is, no result can be returned.

### Why are the changes needed?

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

test suit in `BinaryFileFormatSuite`

```
    testCreateFilterFunction(
      Seq(Not(IsNull(LENGTH))),
      Seq((t1, true), (t2, true), (t3, true)))
```

Closes #37350 from zzzzming95/SPARK-39900.

Lead-authored-by: zzzzming95 <505306252@qq.com>
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit a0dc7d9117b66426aaa2257c8d448a2f96882ecd)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent 7e0a5ef
History
Tip revision: a5f14f4b454d99e04118a10b9a579375114c3c25 authored by zzzzming95 on 03 August 2022, 12:22:55 UTC
[SPARK-39900][SQL] Address partial or negated condition in binary format's predicate pushdown
Tip revision: a5f14f4

README.md

back to top