Skip to content

Commit

Permalink
fix dynamic partition create partition key
Browse files Browse the repository at this point in the history
  • Loading branch information
xiedeyantu committed Mar 17, 2024
1 parent 284fd4b commit 5a13d7f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ public static PartitionKey createPartitionKey(List<PartitionValue> keys, List<Co
}

private static Literal getDateTimeLiteral(String value, Type type) throws AnalysisException {
if (type.equals(Type.DATETIME)) {
if (type.isDate()) {
return new DateTimeLiteral(value);
} else if (type.equals(Type.DATETIMEV2)) {
} else if (type.isDatetimeV2()) {
return new DateTimeV2Literal(value);
}
throw new AnalysisException("date convert to datetime failed.");
Expand Down

0 comments on commit 5a13d7f

Please sign in to comment.