1
0

[MINOR] Fix the wrong usage of timestamp length variable bug (#4179)

Signed-off-by: zzzhy <candle_1667@163.com>
This commit is contained in:
zzzhy
2021-12-02 22:47:31 +08:00
committed by GitHub
parent 772f5ca24e
commit 61a03bc072

View File

@@ -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