From ffdf5ee6c364d06cf3dd40f523b36c4eadad24eb Mon Sep 17 00:00:00 2001 From: zzzhy Date: Wed, 1 Dec 2021 21:37:33 +0800 Subject: [PATCH] fix the wrong usage of timestamp length variable bug 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 6bb956584fadf..aa622e14ec7dd 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