ygerzhedovich commented on code in PR #4045:
URL: https://github.com/apache/ignite-3/pull/4045#discussion_r1672168676


##########
modules/sql-engine/src/testFixtures/java/org/apache/ignite/internal/sql/engine/util/SqlTestUtils.java:
##########
@@ -351,4 +355,50 @@ public static RexNode 
generateLiteralOrValueExpr(ColumnType type, Object value)
                 throw new IllegalArgumentException("Unexpected type: " + type);
         }
     }
+
+    /** Convert {@link ColumnType} to {@link SqlTypeName}. */
+    public static SqlTypeName columnType2SqlTypeName(ColumnType columnType) {
+        switch (columnType) {
+            case NULL:
+                return SqlTypeName.NULL;
+            case BOOLEAN:
+                return SqlTypeName.BOOLEAN;
+            case INT8:
+                return SqlTypeName.TINYINT;
+            case INT16:
+                return SqlTypeName.SMALLINT;
+            case INT32:
+                return SqlTypeName.INTEGER;
+            case INT64:
+                return SqlTypeName.BIGINT;
+            case FLOAT:
+                return SqlTypeName.REAL;
+            case DOUBLE:
+                return SqlTypeName.DOUBLE;
+            case DECIMAL:
+            case NUMBER:
+                return SqlTypeName.DECIMAL;
+            case DATE:
+                return SqlTypeName.DATE;
+            case TIME:
+                return SqlTypeName.TIME;
+            case DATETIME:
+                return SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE;
+            case TIMESTAMP:
+                return SqlTypeName.TIMESTAMP;

Review Comment:
   fixed



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to