You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/11/02 07:13:00 UTC
[jira] [Assigned] (SPARK-33315) simplify CaseWhen with EqualTo
[ https://issues.apache.org/jira/browse/SPARK-33315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-33315:
------------------------------------
Assignee: (was: Apache Spark)
> simplify CaseWhen with EqualTo
> ------------------------------
>
> Key: SPARK-33315
> URL: https://issues.apache.org/jira/browse/SPARK-33315
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.1.0
> Reporter: Yuming Wang
> Priority: Major
>
> {code:sql}
> create table t(a int, b int, c int) using parquet;
> SELECT *
> FROM (SELECT CASE
> WHEN a = 100 THEN 1
> WHEN b > 1000 THEN 2
> WHEN c IS NOT NULL THEN 3
> END AS x
> FROM t) tmp
> WHERE x = 2
> {code}
> {noformat}
> Before this PR:
> Filter (CASE WHEN (a#1 = 100) THEN 1 WHEN (b#2 > 1000) THEN 2 WHEN isnotnull(c#3) THEN 3 END = 2)
> After this PR:
> Filter (b#2 > 1000)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org