Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Fallback if time parser policy is not 'corrected'
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Dec 13, 2021
1 parent d2bf64c commit ecb1a7f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,13 @@ object ColumnarDateTimeExpressions {
buildCheck()

def buildCheck(): Unit = {
val parserPolicy = SQLConf.get.getConf(SQLConf.LEGACY_TIME_PARSER_POLICY);
// TODO: support "exception" time parser policy.
if (!parserPolicy.equalsIgnoreCase("corrected")) {
throw new UnsupportedOperationException(
s"$parserPolicy is NOT a supported time parser policy");
}

val supportedTypes = List(StringType)
if (supportedTypes.indexOf(left.dataType) == -1) {
throw new UnsupportedOperationException(
Expand Down

0 comments on commit ecb1a7f

Please sign in to comment.