[
https://issues.apache.org/jira/browse/SPARK-30705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuming Wang updated SPARK-30705:
--------------------------------
Description:
We only support the first condition expression. But we can improve this pattern:
{code:sql}
CASE WHEN testUdf(a) > 3 THEN 4
WHEN testUdf(a) = 3 THEN 3
WHEN testUdf(a) = 2 THEN 2
WHEN testUdf(a) = 1 THEN 1
ELSE 0 END
{code}
was:
We only support the first condition expression. We can improve this pattern:
{code:sql}
CASE WHEN testUdf(a) > 3 THEN 4
WHEN testUdf(a) = 3 THEN 3
WHEN testUdf(a) = 2 THEN 2
WHEN testUdf(a) = 1 THEN 1
ELSE 0 END
{code}
> Improve CaseWhen sub-expression equality
> ----------------------------------------
>
> Key: SPARK-30705
> URL: https://issues.apache.org/jira/browse/SPARK-30705
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Yuming Wang
> Priority: Major
>
> We only support the first condition expression. But we can improve this
> pattern:
> {code:sql}
> CASE WHEN testUdf(a) > 3 THEN 4
> WHEN testUdf(a) = 3 THEN 3
> WHEN testUdf(a) = 2 THEN 2
> WHEN testUdf(a) = 1 THEN 1
> ELSE 0 END
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]