You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/07 09:31:32 UTC

[GitHub] [flink] matriv commented on a diff in pull request #19190: [FLINK-13785][table] Port time functions to new type inference

matriv commented on code in PR #19190:
URL: https://github.com/apache/flink/pull/19190#discussion_r844922870


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/Signature.java:
##########
@@ -81,11 +85,52 @@ public static Argument of(String name, String type) {
             return new Argument(Preconditions.checkNotNull(name, "Name must not be null."), type);
         }
 
+        public static Argument of(String name, LogicalType type) {
+            return new Argument(
+                    Preconditions.checkNotNull(name, "Name must not be null."),
+                    "<" + type.asSummaryString() + ">");
+        }
+
+        public static Argument of(String name, LogicalTypeRoot typeRoot) {
+            return new Argument(
+                    Preconditions.checkNotNull(name, "Name must not be null."),
+                    "<" + typeRoot + ">");
+        }
+
+        public static Argument of(String name, LogicalTypeFamily typeFamily) {
+            return new Argument(
+                    Preconditions.checkNotNull(name, "Name must not be null."),
+                    "<" + typeFamily + ">");
+        }
+
+        public static Argument of(
+                String name, Class<? extends Enum<? extends TableSymbol>> symbol) {
+            return new Argument(
+                    Preconditions.checkNotNull(name, "Name must not be null."),
+                    "<" + symbol.getSimpleName() + ">");
+        }
+
         /** Returns an instance of {@link Argument}. */
         public static Argument of(String type) {
             return new Argument(null, type);
         }
 
+        public static Argument of(LogicalType type) {
+            return new Argument(null, "<" + type.asSummaryString() + ">");
+        }
+
+        public static Argument of(LogicalTypeRoot typeRoot) {
+            return new Argument(null, "<" + typeRoot + ">");
+        }
+
+        public static Argument of(LogicalTypeFamily typeFamily) {
+            return new Argument(null, "<" + typeFamily + ">");
+        }
+
+        public static Argument of(Class<? extends Enum<?>> symbol) {

Review Comment:
   this is not addressed?



-- 
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: issues-unsubscribe@flink.apache.org

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