[ 
https://issues.apache.org/jira/browse/SPARK-47120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon resolved SPARK-47120.
----------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 45202
[https://github.com/apache/spark/pull/45202]

> Null comparison push down data filter from subquery produces in NPE in 
> Parquet filter
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-47120
>                 URL: https://issues.apache.org/jira/browse/SPARK-47120
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.5.0
>            Reporter: Cosmin Dumitru
>            Assignee: Cosmin Dumitru
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> This issue has been introduced in 
> [https://github.com/apache/spark/pull/41088]  where we convert scalar 
> subqueries to literals and then convert the literals to 
> {{{}org.apache.spark.sql.sources.Filters{}}}. These filters are then pushed 
> down to parquet.
> If the literal is a comparison with {{null}} then the parquet filter 
> conversion code throws NPE. 
>  
> repro code which results in NPE
> {code:java}
> create table t1(d date) using parquet
> create table t2(d date) using parquet
> insert into t1 values date'2021-01-01'
> insert into t2 values (null)
> select * from t1 where 1=1 and d > (select d from t2){code}
> [fix PR |https://github.com/apache/spark/pull/45202/files]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to