Fix bug that cast DateLiteral to other types (#1364)

This commit is contained in:
chenhao
2019-06-24 10:57:25 +08:00
committed by ZHAO Chun
parent f1717e44c8
commit 9cd0e09457

View File

@ -178,7 +178,7 @@ public class DateLiteral extends LiteralExpr {
if (targetType.isDateType()) {
return this;
} else if (targetType.isStringType()) {
return new StringLiteral(date.toString());
return new StringLiteral(getStringValue());
}
Preconditions.checkState(false);
return this;