[
https://issues.apache.org/jira/browse/SPARK-59527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uroš Bojanić resolved SPARK-59527.
----------------------------------
Fix Version/s: 4.4.0
Resolution: Fixed
Issue resolved by pull request 58823
[https://github.com/apache/spark/pull/58823]
> ASOF JOIN MATCH_CONDITION rejects DATE vs STRING accepted by the comparison
> operator
> ------------------------------------------------------------------------------------
>
> Key: SPARK-59527
> URL: https://issues.apache.org/jira/browse/SPARK-59527
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 4.4.0
> Reporter: Luka Zdravic
> Assignee: Luka Zdravic
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.4.0
>
>
> Inside a MATCH_CONDITION, comparing a DATE column to a STRING column fails
> with ASOF_JOIN_MATCH_CONDITION_INVALID_TYPE. The same comparison outside ASOF
> works:
> Spark coerces the string to date. ASOF should apply the same coercion.
> -- fails:
> SELECT * FROM (VALUES (DATE'2024-01-03')) l(d)
> ASOF JOIN (VALUES ('2024-01-01')) r(s)
> MATCH_CONDITION (l.d >= r.s); -- ASOF_JOIN_MATCH_CONDITION_INVALID_TYPE
> -- works:
> SELECT DATE'2024-01-03' >= '2024-01-01'; -- true
> Expected: MATCH_CONDITION accepts and coerces the pair, same as the
> comparison operator.
> Reproduces under ANSI on and off.
> Impact: a valid date-vs-string as-of condition that is a legal comparison
> cannot be written.
>
> Umbrella: SPARK-59526
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]