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 2020/04/06 15:04:41 UTC
[GitHub] [flink] dawidwys commented on a change in pull request #11290:
[FLINK-16379][table] Introduce fromValues in TableEnvironment
dawidwys commented on a change in pull request #11290: [FLINK-16379][table] Introduce fromValues in TableEnvironment
URL: https://github.com/apache/flink/pull/11290#discussion_r404164054
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java
##########
@@ -89,6 +93,223 @@ static TableEnvironment create(EnvironmentSettings settings) {
return TableEnvironmentImpl.create(settings);
}
+ /**
+ * Creates a Table from given values.
+ *
+ * <p>Examples:
+ *
+ * <p>You can use a {@code row(...)} expression to create a composite rows:
+ * <pre>{@code
+ * tEnv.fromValues(
+ * row(1, "ABC"),
+ * row(2L, "ABCDE")
+ * )
+ * }</pre>
+ * will produce a Table with a schema as follows:
+ * <pre>{@code
+ * root
+ * |-- f0: BIGINT NOT NULL
+ * |-- f1: VARCHAR(5) NOT NULL
Review comment:
I don't think so. CHAR(5) would pad the `"ABC"` literal.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services