You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by twalthr <gi...@git.apache.org> on 2017/12/05 15:05:42 UTC
[GitHub] flink pull request #5065: [FLINK-8139][table] Check for proper equals() and ...
Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/5065#discussion_r154964510
--- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala ---
@@ -721,6 +722,42 @@ abstract class TableEnvironment(val config: TableConfig) {
*/
protected def checkValidTableName(name: String): Unit
+ /**
+ * Checks if the chosen table type is valid.
+ * @param table The table to check
+ */
+ protected def checkValidTableType(table: Table): Unit = {
+ val types = table.getSchema.getTypes
+ checkTypeArray(types)
+ }
+
+ private def checkTypeArray(types: Array[TypeInformation[_]]) = {
+ for (typeInfo <- types) {
+ if(!typeInfo.asInstanceOf[TypeInformation[_]].isBasicType &&
--- End diff --
Missing space.
---