You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2021/02/01 14:44:16 UTC

[flink] branch release-1.12 updated: [FLINK-21226][table-common] Reintroduce TableColumn.of for backwards compatibility

This is an automated email from the ASF dual-hosted git repository.

twalthr pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.12 by this push:
     new 47c96e1  [FLINK-21226][table-common] Reintroduce TableColumn.of for backwards compatibility
47c96e1 is described below

commit 47c96e19ce0f49dd8ca9595b75af2df4031d1b07
Author: Timo Walther <tw...@apache.org>
AuthorDate: Mon Feb 1 10:47:30 2021 +0100

    [FLINK-21226][table-common] Reintroduce TableColumn.of for backwards compatibility
---
 .../main/java/org/apache/flink/table/api/TableColumn.java    | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableColumn.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableColumn.java
index 0fe7701..54e731d 100644
--- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableColumn.java
+++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableColumn.java
@@ -101,6 +101,18 @@ public abstract class TableColumn {
         return new MetadataColumn(name, type, metadataAlias, isVirtual);
     }
 
+    /** @deprecated Use {@link #physical(String, DataType)} instead. */
+    @Deprecated
+    public static TableColumn of(String name, DataType type) {
+        return physical(name, type);
+    }
+
+    /** @deprecated Use {@link #computed(String, DataType, String)} instead. */
+    @Deprecated
+    public static TableColumn of(String name, DataType type, String expression) {
+        return computed(name, type, expression);
+    }
+
     /**
      * Returns whether the given column is a physical column of a table; neither computed nor
      * metadata.