aljoscha commented on a change in pull request #13480:
URL: https://github.com/apache/flink/pull/13480#discussion_r497368371
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/TableSchemaUtils.java
##########
@@ -84,21 +84,21 @@ public static TableSchema projectSchema(TableSchema
tableSchema, int[][] project
}
/**
- * Returns true if there are any generated columns in the given {@link
TableColumn}.
+ * Returns true if there are only physical columns in the given {@link
TableSchema}.
*/
- public static boolean containsGeneratedColumns(TableSchema schema) {
+ public static boolean containsPhysicalColumnsOnly(TableSchema schema) {
Preconditions.checkNotNull(schema);
- return
schema.getTableColumns().stream().anyMatch(TableColumn::isGenerated);
+ return
schema.getTableColumns().stream().allMatch(TableColumn::isPhysical);
}
/**
- * Throws exception if the given {@link TableSchema} contains any
generated columns.
+ * Throws an exception if the given {@link TableSchema} contains any
non-physical columns.
*/
- public static TableSchema checkNoGeneratedColumns(TableSchema schema) {
+ public static TableSchema checkPhysicalColumns(TableSchema schema) {
Review comment:
I think `verifyOnlyPhysicalColumns()` or sth like it would be better. As
it is, it sounds like the method will just check all physical columns.
----------------------------------------------------------------
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:
[email protected]