[
https://issues.apache.org/jira/browse/SPARK-50213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
WenjunTao updated SPARK-50213:
------------------------------
Description:
[DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve "date_add(2023-01-14,
(FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) - 1)) * 7))" due to data type
mismatch: Parameter 2 requires the ("INT" or "SMALLINT" or "TINYINT") type,
however "(FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) - 1)) * 7)" has the
type "BIGINT"
The second parameter value was returned by anther function, and it was
supported by spark version 2.4
was:
[DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve "date_add(2023-01-14,
(FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) - 1)) * 7))" due to data type
mismatch: Parameter 2 requires the ("INT" or "SMALLINT" or "TINYINT") type,
however "(FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) - 1)) * 7)" has the
type "BIGINT"
The second parameter value was returned by anther function, and it was
supported by spark version2.4
> date_add/date_sub functions' second parameter support long type
> ---------------------------------------------------------------
>
> Key: SPARK-50213
> URL: https://issues.apache.org/jira/browse/SPARK-50213
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.4.3, 3.4.4
> Reporter: WenjunTao
> Priority: Major
> Fix For: 3.4.4
>
>
> [DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve
> "date_add(2023-01-14, (FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) - 1)) *
> 7))" due to data type mismatch: Parameter 2 requires the ("INT" or "SMALLINT"
> or "TINYINT") type, however "(FLOOR(((datediff(2024-09-08, 2023-01-14) / 7) -
> 1)) * 7)" has the type "BIGINT"
> The second parameter value was returned by anther function, and it was
> supported by spark version 2.4
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]