1
0

Fix TimestampBasedKeyGenerator when DATE_STRING is used for partitionpath.field

This commit is contained in:
Jian Xu
2017-06-27 12:00:37 -07:00
committed by vinoth chandar
parent 754ab88a2d
commit 29b906b763

View File

@@ -91,7 +91,7 @@ public class TimestampBasedKeyGenerator extends SimpleKeyGenerator {
} else if (partitionVal instanceof Long) {
unixTime = (Long) partitionVal;
} else if (partitionVal instanceof String) {
unixTime = inputDateFormat.parse(partitionVal.toString()).getTime();
unixTime = inputDateFormat.parse(partitionVal.toString()).getTime() / 1000;
} else {
throw new HoodieNotSupportedException("Unexpected type for partition field: "+ partitionVal.getClass().getName());
}