You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2024/03/23 13:24:11 UTC
(impala) branch master updated (39f5ec777 -> c0507c02c)
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
from 39f5ec777 IMPALA-12898: Tidy up test dimensions of test_scanner.py
new 266d7ec51 IMPALA-4545: Simplify test dimension in test_decimal_casting.py
new c0507c02c IMPALA-12896 (Part 2): JDBC table must be created as external table
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/impala/analysis/CreateTableStmt.java | 5 +-
.../org/apache/impala/analysis/AnalyzeDDLTest.java | 23 +++++--
.../apache/impala/customcluster/LdapHS2Test.java | 7 +-
testdata/bin/create-ext-data-source-table.sql | 4 +-
.../impala-ext-jdbc-tables-predicates.test | 2 +-
.../queries/QueryTest/impala-ext-jdbc-tables.test | 4 +-
.../QueryTest/jdbc-data-source-with-keystore.test | 4 +-
.../queries/QueryTest/jdbc-data-source.test | 6 +-
.../queries/QueryTest/mysql-ext-jdbc-tables.test | 4 +-
tests/query_test/test_decimal_casting.py | 77 ++++++++++++++--------
10 files changed, 86 insertions(+), 50 deletions(-)
(impala) 01/02: IMPALA-4545: Simplify test dimension in test_decimal_casting.py
Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 266d7ec51c2de00e796d6c29ed0f5eb0972e74c1
Author: Riza Suminto <ri...@cloudera.com>
AuthorDate: Wed Mar 20 10:31:49 2024 -0700
IMPALA-4545: Simplify test dimension in test_decimal_casting.py
This patch splits precision and scale as independent dimensions and then
constrains them to yield a valid decimal type. With this split, core
exploration will have the same test dimension as pairwise exploration,
while exhaustive exploration still permutes all possible decimal types.
Also did minor refactoring to reduce test skipping and pass flake8.
After this patch, core exploration has 214 test items and exhaustive
exploration has 12312 test items. Before, they were 408 and 12464
respectively.
Testing:
- Pass test_decimal_casting.py in core and exhaustive exploration.
Change-Id: Ibe269e08a955097ad9e924d5d64b42438ad15be2
Reviewed-on: http://gerrit.cloudera.org:8080/21174
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
tests/query_test/test_decimal_casting.py | 77 ++++++++++++++++++++------------
1 file changed, 48 insertions(+), 29 deletions(-)
diff --git a/tests/query_test/test_decimal_casting.py b/tests/query_test/test_decimal_casting.py
index e0435a2c1..43e587094 100644
--- a/tests/query_test/test_decimal_casting.py
+++ b/tests/query_test/test_decimal_casting.py
@@ -19,16 +19,15 @@
#
from __future__ import absolute_import, division, print_function
from builtins import range
-import pytest
from decimal import Decimal, getcontext, ROUND_DOWN, ROUND_HALF_UP
-from allpairspy import AllPairs as all_pairs
from random import randint
from tests.common.impala_test_suite import ImpalaTestSuite
from tests.common.test_dimensions import create_exec_option_dimension_from_dict
from tests.common.test_vector import ImpalaTestDimension, ImpalaTestMatrix
-class TestDecimalCasting(ImpalaTestSuite):
+
+class TestDecimalCastingBase(ImpalaTestSuite):
"""Test Suite to verify that casting to Decimal works.
Specifically, this test suite ensures that:
@@ -37,15 +36,6 @@ class TestDecimalCasting(ImpalaTestSuite):
- max/min/NULL/0 can be expressed with their respective decimal types.
- TODO: Add cases for cast from float/double to decimal types.
"""
- DECIMAL_TYPES_MAP = {
- # All possible decimal types.
- # (0 < precision <= 38 && 0 <= scale <= 38 && scale <= precision)
- 'exhaustive': [(p, s) for p in range(1, 39) for s in range(0, p + 1)],
- # Core only deals with precision 6,16,26 (different integer types)
- 'core': [(p, s) for p in [6, 16, 26] for s in range(0, p + 1)],
- # mimics test_vectors.py and takes a subset of all decimal types
- 'pairwise': all_pairs([(p, s) for p in range(1, 39) for s in range(0, p + 1)])
- }
# We can cast for numerics or string types.
CAST_FROM = ['string', 'number']
# Set the default precision to 38 to operate on decimal values.
@@ -60,14 +50,27 @@ class TestDecimalCasting(ImpalaTestSuite):
@classmethod
def add_test_dimensions(cls):
cls.ImpalaTestMatrix = ImpalaTestMatrix()
- cls.ImpalaTestMatrix.add_dimension(ImpalaTestDimension('decimal_type',
- *TestDecimalCasting.DECIMAL_TYPES_MAP[cls.exploration_strategy()]))
+
+ # Core/pairwise only deals with precision 6, 16, 26 (different integer types)
+ precision = [6, 16, 26]
+ # (0 <= scale <= 38)
+ scale = list(range(0, 39))
+ if cls.exploration_strategy() == 'exhaustive':
+ # (0 < precision <= 38)
+ precision = list(range(1, 39))
+
+ cls.ImpalaTestMatrix.add_dimension(ImpalaTestDimension('precision', *precision))
+ cls.ImpalaTestMatrix.add_dimension(ImpalaTestDimension('scale', *scale))
cls.ImpalaTestMatrix.add_dimension(
ImpalaTestDimension('cast_from', *TestDecimalCasting.CAST_FROM))
cls.ImpalaTestMatrix.add_dimension(create_exec_option_dimension_from_dict(
- {'decimal_v2': ['false','true']}))
+ {'decimal_v2': ['false', 'true']}))
cls.iterations = 1
+ # Scale must be less than or equal to precision.
+ cls.ImpalaTestMatrix.add_constraint(
+ lambda v: v.get_value('scale') <= v.get_value('precision'))
+
def _gen_decimal_val(self, precision, scale):
"""Generates a Decimal object with the exact number of digits as the precision."""
# Generates numeric string which has as many digits as the precision.
@@ -76,10 +79,10 @@ class TestDecimalCasting(ImpalaTestSuite):
if scale != 0: num = "{0}.{1}".format(num[:-scale], num[precision - scale:])
# Convert the generated decimal string into a Decimal object and return a -ive/+ive
# version of it with equal probability.
- return Decimal(num) if randint(0,1) else Decimal("-{0}".format(num))
+ return Decimal(num) if randint(0, 1) else Decimal("-{0}".format(num))
def _assert_decimal_result(self, cast, actual, expected):
- assert expected == actual, "Cast: {0}, Expected: {1}, Actual: {2}".format(cast,\
+ assert expected == actual, "Cast: {0}, Expected: {1}, Actual: {2}".format(cast,
expected, actual)
def _normalize_cast_expr(self, decimal_val, precision, cast_from):
@@ -88,6 +91,13 @@ class TestDecimalCasting(ImpalaTestSuite):
else:
return "select cast({0} as Decimal({1},{2}))"
+
+class TestDecimalCasting(TestDecimalCastingBase):
+
+ @classmethod
+ def add_test_dimensions(cls):
+ super(TestDecimalCasting, cls).add_test_dimensions()
+
def test_min_max_zero_null(self, vector):
"""Sanity test at limits.
@@ -96,7 +106,8 @@ class TestDecimalCasting(ImpalaTestSuite):
- 0 is expressible in all decimal types.
- NULL is expressible in all decimal types
"""
- precision, scale = vector.get_value('decimal_type')
+ precision = vector.get_value('precision')
+ scale = vector.get_value('scale')
dec_max = Decimal('{0}.{1}'.format('9' * (precision - scale), '9' * scale))
# Multiplying large values eith -1 can produce an overflow.
dec_min = Decimal('-{0}'.format(str(dec_max)))
@@ -108,7 +119,7 @@ class TestDecimalCasting(ImpalaTestSuite):
res = Decimal(self.execute_scalar(cast.format(dec_min, precision, scale)))
self._assert_decimal_result(cast, res, dec_min)
# Test zero
- res = Decimal(self.execute_scalar(\
+ res = Decimal(self.execute_scalar(
cast.format(TestDecimalCasting.DECIMAL_ZERO, precision, scale)))
self._assert_decimal_result(cast, res, TestDecimalCasting.DECIMAL_ZERO)
# Test NULL
@@ -119,9 +130,8 @@ class TestDecimalCasting(ImpalaTestSuite):
def test_exact(self, vector):
"""Test to verify that an exact representation of the desired Decimal type is
maintained."""
- precision, scale = vector.get_value('decimal_type')
- if vector.get_value('cast_from') == 'decimal':
- pytest.skip("Casting between the same decimal type isn't interesting")
+ precision = vector.get_value('precision')
+ scale = vector.get_value('scale')
for i in range(self.iterations):
val = self._gen_decimal_val(precision, scale)
cast = self._normalize_cast_expr(val, precision, vector.get_value('cast_from'))\
@@ -132,32 +142,41 @@ class TestDecimalCasting(ImpalaTestSuite):
def test_overflow(self, vector):
"""Test to verify that we always return NULL when trying to cast a number with greater
precision that its intended decimal type"""
- precision, scale = vector.get_value('decimal_type')
+ precision = vector.get_value('precision')
+ scale = vector.get_value('scale')
for i in range(self.iterations):
# Generate a decimal with a larger precision than the one we're casting to.
from_precision = randint(precision + 1, 39)
val = self._gen_decimal_val(from_precision, scale)
- cast = self._normalize_cast_expr(val, from_precision,\
+ cast = self._normalize_cast_expr(val, from_precision,
vector.get_value('cast_from')).format(val, precision, scale)
- res = self.execute_query_expect_failure(self.client, cast)
+ self.execute_query_expect_failure(self.client, cast)
+
+
+class TestDecimalCastingUnderflow(TestDecimalCastingBase):
+
+ @classmethod
+ def add_test_dimensions(cls):
+ super(TestDecimalCastingUnderflow, cls).add_test_dimensions()
+ # "Cannot underflow scale when precision and scale are equal"
+ cls.ImpalaTestMatrix.add_constraint(
+ lambda v: v.get_value('scale') < v.get_value('precision'))
def test_underflow(self, vector):
"""Test to verify that we truncate when the scale of the number being cast is higher
than the target decimal type (with no change in precision).
"""
- precision, scale = vector.get_value('decimal_type')
+ precision = vector.get_value('precision')
+ scale = vector.get_value('scale')
is_decimal_v2 = vector.get_value('exec_option')['decimal_v2'] == 'true'
cast_from = vector.get_value('cast_from')
- if precision == scale:
- pytest.skip("Cannot underflow scale when precision and scale are equal")
for i in range(self.iterations):
from_scale = randint(scale + 1, precision)
val = self._gen_decimal_val(precision, from_scale)
cast = self._normalize_cast_expr(val, precision, cast_from)\
.format(val, precision, scale)
res = Decimal(self.execute_scalar(cast, vector.get_value('exec_option')))
- # TODO: Remove check for cast_from once string to decimal is supported in decimal_v2.
if is_decimal_v2:
expected_val = val.quantize(Decimal('0e-%s' % scale), rounding=ROUND_HALF_UP)
else:
(impala) 02/02: IMPALA-12896 (Part 2): JDBC table must be created as external table
Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit c0507c02cd0d81c4133820b96d45002048257c00
Author: wzhou-code <wz...@cloudera.com>
AuthorDate: Mon Mar 18 00:01:18 2024 -0700
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 <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
.../apache/impala/analysis/CreateTableStmt.java | 5 ++++-
.../org/apache/impala/analysis/AnalyzeDDLTest.java | 23 +++++++++++++++++-----
.../apache/impala/customcluster/LdapHS2Test.java | 7 ++++---
testdata/bin/create-ext-data-source-table.sql | 4 ++--
.../impala-ext-jdbc-tables-predicates.test | 2 +-
.../queries/QueryTest/impala-ext-jdbc-tables.test | 4 ++--
.../QueryTest/jdbc-data-source-with-keystore.test | 4 ++--
.../queries/QueryTest/jdbc-data-source.test | 6 +++---
.../queries/QueryTest/mysql-ext-jdbc-tables.test | 4 ++--
9 files changed, 38 insertions(+), 21 deletions(-)
diff --git a/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java b/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
index 6d74a669d..8899bbd8f 100644
--- a/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
+++ b/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
@@ -269,7 +269,7 @@ public class CreateTableStmt extends StatementBase {
// schema. Likewise for external Kudu tables, the schema can be read from Kudu.
if (getColumnDefs().isEmpty() && getFileFormat() != THdfsFileFormat.AVRO
&& getFileFormat() != THdfsFileFormat.KUDU && getFileFormat() !=
- THdfsFileFormat.ICEBERG && getFileFormat() != THdfsFileFormat.JDBC) {
+ THdfsFileFormat.ICEBERG) {
throw new AnalysisException("Table requires at least 1 column");
}
if (getRowFormat() != null) {
@@ -896,6 +896,9 @@ public class CreateTableStmt extends StatementBase {
* HMS.
*/
private void analyzeJdbcSchema(Analyzer analyzer) throws AnalysisException {
+ if (!isExternal()) {
+ throw new AnalysisException("JDBC table must be created as external table");
+ }
for (ColumnDef col: getColumnDefs()) {
if (!DataSourceTable.isSupportedColumnType(col.getType())) {
throw new AnalysisException("Tables stored by JDBC do not support the column " +
diff --git a/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java b/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
index 02a3aebdb..a1ea8cd9a 100644
--- a/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
+++ b/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
@@ -2966,18 +2966,31 @@ public class AnalyzeDDLTest extends FrontendTestBase {
"' '", "URI path cannot be empty.");
// Create JDBC tables
- AnalyzesOk("CREATE TABLE Foo (i int) STORED BY JDBC " +
+ AnalyzesOk("CREATE EXTERNAL TABLE Foo (i int) STORED BY JDBC " +
"TBLPROPERTIES ('database.type'='a', 'jdbc.url'='b', " +
"'jdbc.driver'='c', 'driver.url'='d', 'dbcp.username'='e', " +
"'dbcp.password'='f', 'table'='g')");
- AnalysisError("CREATE TABLE Foo (i int) STORED BY JDBC TBLPROPERTIES ('a'='b')",
+ AnalysisError("CREATE TABLE Foo (i int) STORED BY JDBC " +
+ "TBLPROPERTIES ('database.type'='a', 'jdbc.url'='b', " +
+ "'jdbc.driver'='c', 'driver.url'='d', 'dbcp.username'='e', " +
+ "'dbcp.password'='f', 'table'='g')",
+ "JDBC table must be created as external table");
+ AnalysisError("CREATE EXTERNAL TABLE Foo STORED BY JDBC " +
+ "TBLPROPERTIES ('database.type'='a', 'jdbc.url'='b', " +
+ "'jdbc.driver'='c', 'driver.url'='d', 'dbcp.username'='e', " +
+ "'dbcp.password'='f', 'table'='g')",
+ "Table requires at least 1 column");
+ AnalysisError("CREATE EXTERNAL TABLE Foo (i int) STORED BY JDBC " +
+ "TBLPROPERTIES ('a'='b')",
"Cannot create table 'Foo': Required JDBC config 'database.type' is not " +
"present in table properties.");
- AnalysisError("CREATE TABLE Foo (i int) STORED BY JDBC CACHED IN 'testPool'",
+ AnalysisError("CREATE EXTERNAL TABLE Foo (i int) STORED BY JDBC " +
+ "CACHED IN 'testPool'",
"A JDBC table cannot be cached in HDFS.");
- AnalysisError("CREATE TABLE Foo (i int) STORED BY JDBC LOCATION " +
+ AnalysisError("CREATE EXTERNAL TABLE Foo (i int) STORED BY JDBC LOCATION " +
"'/test-warehouse/new_table'", "LOCATION cannot be specified for a JDBC table.");
- AnalysisError("CREATE TABLE Foo (i int) PARTITIONED BY (d decimal) STORED BY JDBC ",
+ AnalysisError("CREATE EXTERNAL TABLE Foo (i int) PARTITIONED BY (d decimal) " +
+ "STORED BY JDBC ",
"PARTITIONED BY cannot be used in a JDBC table.");
// Create table PRODUCED BY DATA SOURCE
diff --git a/fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java b/fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
index 3385d7c19..5831d01df 100644
--- a/fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
+++ b/fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
@@ -741,7 +741,8 @@ public class LdapHS2Test {
String dropTableQuery = "DROP TABLE IF EXISTS %s";
// Set JDBC authentication mechanisms as LDAP (3) with username/password as
// TEST_USER_1/TEST_PASSWORD_1.
- String createTableQuery = String.format("CREATE TABLE impala_jdbc_ext_test_table (" +
+ String createTableQuery =
+ String.format("CREATE EXTERNAL TABLE impala_jdbc_ext_test_table (" +
"id INT, bool_col BOOLEAN, tinyint_col TINYINT, smallint_col SMALLINT, " +
"int_col INT, bigint_col BIGINT, float_col FLOAT, double_col DOUBLE, " +
"date_string_col STRING, string_col STRING, timestamp_col TIMESTAMP) " +
@@ -758,7 +759,7 @@ public class LdapHS2Test {
internalListenHost, fileSystemPrefix, TEST_USER_1, TEST_PASSWORD_1);
// Set JDBC authentication mechanisms as LDAP with wrong password.
String createTableWithWrongPassword =
- String.format("CREATE TABLE impala_jdbc_tbl_wrong_password (" +
+ String.format("CREATE EXTERNAL TABLE impala_jdbc_tbl_wrong_password (" +
"id INT, bool_col BOOLEAN, tinyint_col TINYINT, smallint_col SMALLINT, " +
"int_col INT, bigint_col BIGINT, float_col FLOAT, double_col DOUBLE, " +
"date_string_col STRING, string_col STRING, timestamp_col TIMESTAMP) " +
@@ -775,7 +776,7 @@ public class LdapHS2Test {
internalListenHost, fileSystemPrefix, TEST_USER_1);
// Set JDBC authentication mechanisms as LDAP without AuthMech.
String createTableWithoutAuthMech =
- String.format("CREATE TABLE impala_jdbc_tbl_without_auth_mech (" +
+ String.format("CREATE EXTERNAL TABLE impala_jdbc_tbl_without_auth_mech (" +
"id INT, bool_col BOOLEAN, tinyint_col TINYINT, smallint_col SMALLINT, " +
"int_col INT, bigint_col BIGINT, float_col FLOAT, double_col DOUBLE, " +
"date_string_col STRING, string_col STRING, timestamp_col TIMESTAMP) " +
diff --git a/testdata/bin/create-ext-data-source-table.sql b/testdata/bin/create-ext-data-source-table.sql
index 30930142b..3a2134373 100644
--- a/testdata/bin/create-ext-data-source-table.sql
+++ b/testdata/bin/create-ext-data-source-table.sql
@@ -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,
diff --git a/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables-predicates.test b/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables-predicates.test
index 69267209b..edd42c2a2 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables-predicates.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables-predicates.test
@@ -2,7 +2,7 @@
---- QUERY
# Create external JDBC DataSource table
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,
diff --git a/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables.test b/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables.test
index 526423296..3715d8071 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables.test
@@ -2,7 +2,7 @@
---- QUERY
# Create external JDBC DataSource table
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,
@@ -31,7 +31,7 @@ TBLPROPERTIES (
---- QUERY
# Create external JDBC DataSource table
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,
diff --git a/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source-with-keystore.test b/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source-with-keystore.test
index b3f8d0a26..d8896ca1d 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source-with-keystore.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source-with-keystore.test
@@ -2,7 +2,7 @@
---- QUERY
# Create external JDBC DataSource table with username, key and keystore
DROP TABLE IF EXISTS alltypes_jdbc_datasource_keystore;
-CREATE TABLE alltypes_jdbc_datasource_keystore (
+CREATE EXTERNAL TABLE alltypes_jdbc_datasource_keystore (
id INT,
bool_col BOOLEAN,
tinyint_col TINYINT,
@@ -54,7 +54,7 @@ DROP TABLE alltypes_jdbc_datasource_keystore;
---- QUERY
# Create external JDBC DataSource table with username and keystore
DROP TABLE IF EXISTS alltypes_jdbc_datasource_keystore;
-CREATE TABLE alltypes_jdbc_datasource_keystore (
+CREATE EXTERNAL TABLE alltypes_jdbc_datasource_keystore (
id INT,
bool_col BOOLEAN,
tinyint_col TINYINT,
diff --git a/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test b/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
index 8f74016e9..9d6486168 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
@@ -2,7 +2,7 @@
---- QUERY
# Create external JDBC DataSource table
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,
@@ -30,7 +30,7 @@ TBLPROPERTIES (
---- QUERY
# Create external JDBC DataSource table
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,
@@ -436,7 +436,7 @@ DROP TABLE alltypes_jdbc_datasource_2;
---- QUERY
# Create JDBC table with unknown database type.
DROP TABLE IF EXISTS jdbc_test;
-CREATE TABLE jdbc_test (
+CREATE EXTERNAL TABLE jdbc_test (
id INT,
bool_col BOOLEAN,
int_col INT)
diff --git a/testdata/workloads/functional-query/queries/QueryTest/mysql-ext-jdbc-tables.test b/testdata/workloads/functional-query/queries/QueryTest/mysql-ext-jdbc-tables.test
index 273f83b68..909c394a3 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/mysql-ext-jdbc-tables.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/mysql-ext-jdbc-tables.test
@@ -2,7 +2,7 @@
---- QUERY
# Create external JDBC DataSource table
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,
@@ -30,7 +30,7 @@ TBLPROPERTIES (
---- QUERY
# Create external JDBC DataSource table
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,