File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3192,6 +3192,32 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession {
31923192 checkAnswer(df3, Array (Row (new java.math.BigDecimal (" 0.100000000000000000000000100" ))))
31933193 }
31943194 }
3195+
3196+ test(" SPARK-29213: use IsNotNull in FilterExec to omit null checks for non-output attributes" ) {
3197+ withView(" t1" , " t2" , " t3" ) {
3198+ sql(" select ''" ).as[String ].map(identity).toDF(" x" ).createOrReplaceTempView(" t1" )
3199+ sql(" select * from values 0, cast(null as bigint)" )
3200+ .as[java.lang.Long ]
3201+ .map(identity)
3202+ .toDF(" x" )
3203+ .createOrReplaceTempView(" t2" )
3204+ sql(" select ''" ).as[String ].map(identity).toDF(" x" ).createOrReplaceTempView(" t3" )
3205+ sql(
3206+ """
3207+ |select t1.x
3208+ |from t1
3209+ |left join (
3210+ | select x from (
3211+ | select x from t2
3212+ | union all
3213+ | select substr(x,5) x from t3
3214+ | ) a
3215+ | where length(x)>0
3216+ |) t3
3217+ |on t1.x=t3.x
3218+ """ .stripMargin).collect()
3219+ }
3220+ }
31953221}
31963222
31973223case class Foo (bar : Option [String ])
You can’t perform that action at this time.
0 commit comments