yiguolei commented on code in PR #9972:
URL: https://github.com/apache/incubator-doris/pull/9972#discussion_r890086208
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java:
##########
@@ -315,8 +335,12 @@ public static void validateDefaultValue(Type type, String
defaultValue) throws A
decimalLiteral.checkPrecisionAndScale(scalarType.getScalarPrecision(),
scalarType.getScalarScale());
break;
case DATE:
+ DateLiteral dateLiteral = new DateLiteral(defaultValue, type);
+ break;
case DATETIME:
- new DateLiteral(defaultValue, type);
+ if (defaultValueExprDef == null ||
!defaultValueExprDef.getExprName().equals(DefaultValue.NOW)) {
+ DateLiteral datetimeLiteral = new
DateLiteral(defaultValue, type);
Review Comment:
if defaultValueExprDef == null, then check datetimeLiteral
if defaultValueExprDef != null, then check the function name == now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]