Serge Rielau created SPARK-49768:
------------------------------------
Summary: Provide error Conditions for make_date/make_timestamp
errors _LEGACY_ERROR_TEMP_2000
Key: SPARK-49768
URL: https://issues.apache.org/jira/browse/SPARK-49768
Project: Spark
Issue Type: Improvement
Components: Spark Core
Affects Versions: 4.0.0
Reporter: Serge Rielau
invoking make_date() or make_timestamp() with out of domain arguments result in
error messages which have not been converted to the new error format.
All of these errors are related to ANSI mode, so we should fix them to
facilitate the move to ANSI mode
Example:
{noformat}
SET spark.sql.ansi.enabled = true;
SELECT make_date(2024, 13, 1);
Invalid value for MonthOfYear (valid values 1 - 12): 13. If necessary set
"spark.sql.ansi.enabled" to false to bypass this error.
org.apache.spark.SparkDateTimeException: Invalid value for MonthOfYear (valid
values 1 - 12): 13. If necessary set "spark.sql.ansi.enabled" to false to
bypass this error.
at
org.apache.spark.sql.errors.QueryExecutionErrors$.ansiDateTimeError(QueryExecutionErrors.scala:287)
at
org.apache.spark.sql.catalyst.expressions.MakeDate.nullSafeEval(datetimeExpressions.scala:2483)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]