You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2025/12/15 21:47:22 UTC
(impala) 01/02: IMPALA-14546: Fix jdbc driver urls in test_postgres_jdbc_tables
This is an automated email from the ASF dual-hosted git repository.
michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit aa4f19219cf26bc4c7f5900100af65baa5c33074
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Mon Dec 15 19:26:24 2025 +0800
IMPALA-14546: Fix jdbc driver urls in test_postgres_jdbc_tables
TestPostgresJdbcTables.test_postgres_jdbc_tables uses hardcoded paths
for JDBC driver URLs:
"/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar".
This doesn't work correctly when running on Ozone where we need the
prefix of "ofs://localhost:9862/impala".
This patch fixes the issue by constructing the driver URL with
FILESYSTEM_PREFIX which is "ofs://localhost:9862/impala" on Ozone.
See more in bin/impala-config.sh about how it's set for different
filesystems.
Tests:
- Ran the test on Ozone.
Change-Id: Ie0c4368b3262d4dcb9e1c05475506411be2e2ef5
Reviewed-on: http://gerrit.cloudera.org:8080/23787
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Riza Suminto <ri...@cloudera.com>
---
tests/custom_cluster/test_ext_data_sources.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/custom_cluster/test_ext_data_sources.py b/tests/custom_cluster/test_ext_data_sources.py
index 583e30589..1f0c6d919 100644
--- a/tests/custom_cluster/test_ext_data_sources.py
+++ b/tests/custom_cluster/test_ext_data_sources.py
@@ -25,6 +25,7 @@ from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
from tests.common.environ import build_flavor_timeout
from tests.common.skip import SkipIfApacheHive
from tests.common.test_dimensions import create_exec_option_dimension
+from tests.util.filesystem_utils import FILESYSTEM_PREFIX
from time import sleep
@@ -187,6 +188,8 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
@pytest.mark.execute_serially
def test_postgres_jdbc_tables(self, vector, unique_database):
+ driver_url = FILESYSTEM_PREFIX +\
+ "/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar"
sql = """
DROP TABLE IF EXISTS {0}.country_postgres;
CREATE EXTERNAL TABLE {0}.country_postgres (
@@ -208,7 +211,7 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
"jdbc.url"="jdbc:postgresql://localhost:5432/functional",
"jdbc.auth"="AuthMech=0",
"jdbc.driver"="org.postgresql.Driver",
- "driver.url"="/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar",
+ "driver.url"="{1}",
"dbcp.username"="hiveuser",
"dbcp.password"="password",
"table"="country");
@@ -235,7 +238,7 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
"jdbc.url"="jdbc:postgresql://localhost:5432/functional",
"jdbc.auth"="AuthMech=0",
"jdbc.driver"="org.postgresql.Driver",
- "driver.url"="/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar",
+ "driver.url"="{1}",
"dbcp.username"="hiveuser",
"dbcp.password"="password",
"table"="quoted_col"
@@ -261,7 +264,7 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
"jdbc.url"="jdbc:postgresql://localhost:5432/functional",
"jdbc.auth"="AuthMech=0",
"jdbc.driver"="org.postgresql.Driver",
- "driver.url"="/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar",
+ "driver.url"="{1}",
"dbcp.username"="hiveuser",
"dbcp.password"="password",
"table"="country");
@@ -286,7 +289,7 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
"jdbc.url"="jdbc:postgresql://localhost:5432/functional",
"jdbc.auth"="AuthMech=0",
"jdbc.driver"="org.postgresql.Driver",
- "driver.url"="/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar",
+ "driver.url"="{1}",
"dbcp.username"="hiveuser",
"dbcp.password"="password",
"query"="select id,name,bool_col,tinyint_col,smallint_col,
@@ -313,13 +316,13 @@ class TestPostgresJdbcTables(CustomClusterTestSuite):
"jdbc.url"="jdbc:postgresql://localhost:5432/functional",
"jdbc.auth"="AuthMech=0",
"jdbc.driver"="org.postgresql.Driver",
- "driver.url"="/test-warehouse/data-sources/jdbc-drivers/postgresql-jdbc.jar",
+ "driver.url"="{1}",
"dbcp.username"="hiveuser",
"dbcp.password"="password",
"query"="select id,name,bool_col,tinyint_col,smallint_col,
int_col,bigint_col,float_col,double_col,date_col,string_col,
timestamp_col from country");
- """.format(unique_database)
+ """.format(unique_database, driver_url)
'''
try: