davidradl commented on code in PR #28266:
URL: https://github.com/apache/flink/pull/28266#discussion_r3354551726
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java:
##########
@@ -1080,6 +1081,34 @@ void createTemporarySystemFunction(
*/
Table from(String path);
+ /**
+ * Reads a registered table and applies dynamic options, returning the
corresponding {@link
+ * Table}.
+ *
+ * <p>Dynamic options override the table's static options defined at
creation time (DDL).
+ * This is the Table API equivalent of SQL's {@code OPTIONS} hint:
+ *
+ * <pre>{@code
+ * // Table API (this method)
+ * Table tab = tableEnv.from("kafka_table1", Map.of("scan.startup.mode",
"earliest-offset"));
+ *
+ * // Equivalent SQL
+ * // SELECT * FROM kafka_table1 /*+
OPTIONS('scan.startup.mode'='earliest-offset') * /
+ * }</pre>
+ *
+ * <p>The configuration option {@code table.dynamic-table-options.enabled}
must be set to
+ * {@code true} (the default) for dynamic options to take effect.
+ *
+ * <p>Note: Dynamic options cannot be applied to views.
+ *
+ * @param path The path of a table API object to scan.
+ * @param dynamicOptions A map of option key-value pairs to override on
the table.
+ * @return The {@link Table} object describing the pipeline for further
transformations.
+ * @throws ValidationException if the table is not found, is a view, or
dynamic options are
+ * disabled.
+ */
+ Table from(String path, Map<String, String> dynamicOptions);
Review Comment:
are all dynamic options Strings?
--
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]