You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2022/09/03 05:02:46 UTC
[spark] branch master updated: [SPARK-40319][SQL] Remove duplicated query execution error method for PARSE_DATETIME_BY_NEW_PARSER
This is an automated email from the ASF dual-hosted git repository.
maxgekk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 18b5e93034b [SPARK-40319][SQL] Remove duplicated query execution error method for PARSE_DATETIME_BY_NEW_PARSER
18b5e93034b is described below
commit 18b5e93034b6a264e4c491ba4823b489190e741c
Author: Gengliang Wang <ge...@apache.org>
AuthorDate: Sat Sep 3 08:02:25 2022 +0300
[SPARK-40319][SQL] Remove duplicated query execution error method for PARSE_DATETIME_BY_NEW_PARSER
### What changes were proposed in this pull request?
Remove duplicated query execution error method for PARSE_DATETIME_BY_NEW_PARSER
### Why are the changes needed?
code clean up
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing UT
Closes #37776 from gengliangwang/minorDeDuplicate.
Authored-by: Gengliang Wang <ge...@apache.org>
Signed-off-by: Max Gekk <ma...@gmail.com>
---
.../spark/sql/catalyst/util/DateTimeFormatterHelper.scala | 2 +-
.../org/apache/spark/sql/errors/QueryExecutionErrors.scala | 11 -----------
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
index cb03ab2ee4a..96812cd65c1 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
@@ -161,7 +161,7 @@ trait DateTimeFormatterHelper {
} catch {
case _: Throwable => throw e
}
- throw QueryExecutionErrors.failToFormatDateTimeInNewFormatterError(resultCandidate, e)
+ throw QueryExecutionErrors.failToParseDateTimeInNewParserError(resultCandidate, e)
}
/**
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
index 3dcefcc5368..f4ec70e81d9 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
@@ -1068,17 +1068,6 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
e)
}
- def failToFormatDateTimeInNewFormatterError(
- resultCandidate: String, e: Throwable): Throwable = {
- new SparkUpgradeException(
- errorClass = "INCONSISTENT_BEHAVIOR_CROSS_VERSION",
- errorSubClass = Some("PARSE_DATETIME_BY_NEW_PARSER"),
- messageParameters = Array(
- toSQLValue(resultCandidate, StringType),
- toSQLConf(SQLConf.LEGACY_TIME_PARSER_POLICY.key)),
- e)
- }
-
def failToRecognizePatternAfterUpgradeError(pattern: String, e: Throwable): Throwable = {
new SparkUpgradeException(
errorClass = "INCONSISTENT_BEHAVIOR_CROSS_VERSION",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org