This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch release-0.10.0
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit 3e2116e69fb33009ba3336720f2c7d8d00909232
Author: zzzhy <[email protected]>
AuthorDate: Thu Dec 2 22:47:31 2021 +0800

    [MINOR] Fix the wrong usage of timestamp length variable bug (#4179)
    
    Signed-off-by: zzzhy <[email protected]>
    (cherry picked from commit 61a03bc072c8d446a7334fdf7a284fca0a91f8c0)
---
 .../src/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 6bb9565..aa622e1 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

Reply via email to