IMPALA-12896 (Part 2): JDBC table must be created as external table

In some of the deployment environments, default table type is
transactional. In these scenarios, JDBC tables which are created as non
external table are not accepted by HMS due to strict managed table check
failures.

This patch forces JDBC tables to be created as external table, and
requires at least 1 column for JDBC tables.

Testing:
 - Updated frontend unit tests and end-to-end unit tests to create JDBC
   tables as external tables.
 - Passed core tests

Change-Id: Ib5533b52434cdf1c430e30ac28a0146ab4d9d4b9
Reviewed-on: http://gerrit.cloudera.org:8080/21159
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
wzhou-code
2024-03-18 00:01:18 -07:00
committed by Impala Public Jenkins
parent 266d7ec51c
commit c0507c02cd
9 changed files with 38 additions and 21 deletions

View File

@@ -47,7 +47,7 @@ CREATE TABLE alltypes_datasource (
PRODUCED BY DATA SOURCE AllTypesDataSource("TestInitString");
DROP TABLE IF EXISTS alltypes_jdbc_datasource;
CREATE TABLE alltypes_jdbc_datasource (
CREATE EXTERNAL TABLE alltypes_jdbc_datasource (
id INT,
bool_col BOOLEAN,
tinyint_col TINYINT,
@@ -70,7 +70,7 @@ TBLPROPERTIES (
"table"="alltypes");
DROP TABLE IF EXISTS alltypes_jdbc_datasource_2;
CREATE TABLE alltypes_jdbc_datasource_2 (
CREATE EXTERNAL TABLE alltypes_jdbc_datasource_2 (
id INT,
bool_col BOOLEAN,
tinyint_col TINYINT,