AMashenkov commented on code in PR #3222:
URL: https://github.com/apache/ignite-3/pull/3222#discussion_r1494414520


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DdlSqlToCommandConverter.java:
##########
@@ -824,60 +842,142 @@ private Type convertIndexType(IgniteSqlIndexType type) {
     /**
      * Creates a value of required type from the literal.
      */
-    private static @Nullable Object fromLiteral(ColumnType columnType, 
SqlLiteral literal) {
+    private static @Nullable Object fromLiteral(ColumnType columnType, 
SqlLiteral literal, int precision) {
         if (literal.getValue() == null) {
             return null;
         }
 
         try {
             switch (columnType) {
-                case STRING:
-                    return literal.getValueAs(String.class);
+                case PERIOD: {
+                    if (!(literal instanceof SqlCharStringLiteral) && 
!(literal instanceof SqlIntervalLiteral)) {
+                        throw new SqlException(STMT_VALIDATION_ERR,

Review Comment:
   Why can't we apply Default expression to interval type? Because intervals 
are not supported? 



-- 
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]

Reply via email to