From 61a03bc072c8d446a7334fdf7a284fca0a91f8c0 Mon Sep 17 00:00:00 2001 From: zzzhy Date: Thu, 2 Dec 2021 22:47:31 +0800 Subject: [PATCH] [MINOR] Fix the wrong usage of timestamp length variable bug (#4179) Signed-off-by: zzzhy --- .../main/scala/org/apache/spark/sql/hudi/HoodieSqlUtils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlUtils.scala b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlUtils.scala index 6bb956584..aa622e14e 100644 --- a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlUtils.scala +++ b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlUtils.scala @@ -299,7 +299,7 @@ object HoodieSqlUtils extends SparkAdapterSupport { val instantLength = queryInstant.length if (instantLength == 19 || instantLength == 23) { // for yyyy-MM-dd HH:mm:ss[.SSS] HoodieInstantTimeGenerator.getInstantForDateString(queryInstant) - } else if (instantLength == HoodieInstantTimeGenerator.SECS_INSTANT_TIMESTAMP_FORMAT + } else if (instantLength == HoodieInstantTimeGenerator.SECS_INSTANT_ID_LENGTH || instantLength == HoodieInstantTimeGenerator.MILLIS_INSTANT_ID_LENGTH) { // for yyyyMMddHHmmss[SSS] HoodieActiveTimeline.parseDateFromInstantTime(queryInstant) // validate the format queryInstant