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/09/09 08:21:29 UTC

[GitHub] [flink] SteNicholas commented on a change in pull request #13315: [FLINK-19070][hive] Hive connector should throw a meaningful exception if user reads/writes ACID tables

SteNicholas commented on a change in pull request #13315:
URL: https://github.com/apache/flink/pull/13315#discussion_r485427257



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/util/HiveTableUtil.java
##########
@@ -403,6 +404,25 @@ public static Table instantiateHiveTable(ObjectPath tablePath, CatalogBaseTable
 				.collect(Collectors.toMap(t -> t.f0, t -> t.f1));
 	}
 
+	/**
+	 * Check whether to read or write on the hive ACID table.
+	 *
+	 * @param catalogTable Hive catalog table.
+	 * @param tablePath    Identifier table path.
+	 * @throws FlinkHiveException Thrown, if the source or sink table is transactional.
+	 */
+	public static void checkAcidTable(CatalogTable catalogTable, ObjectPath tablePath) {
+		if (catalogTable != null && catalogTable.getOptions() != null) {

Review comment:
       @JingsongLi `checkAcidTable` is the util method for `HiveTableUtil`, which should add check for the parameter `catalogTable`.




----------------------------------------------------------------
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