Fix bug that cast DateLiteral to other types (#1364)
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user