davidradl commented on code in PR #26632:
URL: https://github.com/apache/flink/pull/26632#discussion_r2127061619
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/Schema.java:
##########
@@ -595,9 +621,57 @@ public Builder primaryKeyNamed(String constraintName,
List<String> columnNames)
return this;
}
+ /**
+ * Declares an index for a set of given columns. Indexes are designed
to enable very
+ * efficient search. The indexes are informational only and can be
used for optimizations.
+ * It is the data owner's responsibility to guarantee the index
queries allow the complete
+ * row to be retrieved efficiently.
+ *
+ * <p>The index will be assigned a generated name in the format {@code
INDEX_col1_col2}.
+ *
+ * @param columns indexes that form a table index
+ */
+ public Builder index(String... columns) {
+ Preconditions.checkNotNull(indexes, "Index column names must not
be null.");
+ return index(Arrays.asList(columns));
+ }
+
+ /**
+ * Declares an index for a set of given columns. Indexes are designed
to enable very
+ * efficient search. The indexes are informational only and can be
used for optimizations.
+ * It is the data owner's responsibility to guarantee the index
queries allow the complete
+ * row to be retrieved efficiently.
+ *
+ * <p>The index will be assigned a generated name in the format {@code
INDEX_col1_col2}.
+ *
+ * @param columns indexes that form a table index
+ */
+ public Builder index(List<String> columns) {
Review Comment:
nit: columns -> columnNames
--
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]