You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Pranav Lodha (Code Review)" <ge...@cloudera.org> on 2025/05/21 07:06:01 UTC
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Pranav Lodha has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22865
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 975 insertions(+), 82 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/2
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 2
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 6: Verified-1
Build Failed
https://jenkins.impala.io/job/gerrit-code-review-checks/19510/ : ABORTED
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 6
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 17 Jun 2025 14:04:45 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 18:
(2 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py@177
PS18, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
flake8: E302 expected 2 blank lines, found 1
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py@368
PS18, Line 368: s
flake8: E501 line too long (93 > 90 characters)
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 18
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:09:37 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 7:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19519/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 7
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 17 Jun 2025 21:15:47 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 17:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20755/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 17
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:16:20 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 22:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12602/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 22
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 16:51:25 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 19:
(1 comment)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/19/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/19/tests/custom_cluster/test_ext_data_sources.py@177
PS19, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
flake8: E302 expected 2 blank lines, found 1
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 19
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:19:43 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 3:
(23 comments)
> Uploaded patch set 3.
http://gerrit.cloudera.org:8080/#/c/22865/1/fe/src/main/java/org/apache/impala/catalog/TableLoader.java
File fe/src/main/java/org/apache/impala/catalog/TableLoader.java:
http://gerrit.cloudera.org:8080/#/c/22865/1/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@234
PS1, Line 234:
> we also need to check either table or query property is set for NON hive jd
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/catalog/TableLoader.java
File fe/src/main/java/org/apache/impala/catalog/TableLoader.java:
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@234
PS2, Line 234:
> call Strings.isNullOrEmpty() for table and query
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@235
PS2, Line 235: if (Strings.isNullOrEmpty(table) && Strings.isNullOrEmpty(query)) {
> line too long (98 > 90)
Done
http://gerrit.cloudera.org:8080/#/c/22865/1/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/1/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@307
PS1, Line 307: if (!Strings.isNullOrEmpty(tableName)) { // Ensure 'table' prop
> fix the indent after this line
Done
http://gerrit.cloudera.org:8080/#/c/22865/1/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@336
PS1, Line 336: // Use 'query' property if 'table' is null
> add an assertion to make sure query is not empty
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@307
PS2, Line 307: !Strings.isNullOr
> call !Strings.isNullOrEmpty(tableName)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@319
PS2, Line 319:
> add indent spaces
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@338
PS2, Line 338: Strings.isNullOrEmpty(query)) {
> call Strings.isNullOrEmpty(query)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java:
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java@108
PS2, Line 108: ng query = props.get(JdbcStorageConfig.QUERY.getPropertyName());
> import com.google.common.base.Strings, them call Strings.isNullOrEmpty(tabl
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java@110
PS2, Line 110: throw new IllegalArgumentException(
> line too long (95 > 90)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java@110
PS2, Line 110: egalArgu
> Don't need to mention non-Hive
Done
http://gerrit.cloudera.org:8080/#/c/22865/1/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/1/tests/custom_cluster/test_ext_data_sources.py@247
PS1, Line 247:
> remove spaces here
Done
http://gerrit.cloudera.org:8080/#/c/22865/1/tests/custom_cluster/test_ext_data_sources.py@273
PS1, Line 273:
> remove spaces
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@84
PS2, Line 84:
> flake8: E501 line too long (96 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@85
PS2, Line 85:
> flake8: E501 line too long (105 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@100
PS2, Line 100:
> flake8: E501 line too long (97 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@124
PS2, Line 124:
> flake8: E501 line too long (96 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@125
PS2, Line 125:
> flake8: E501 line too long (109 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@271
PS2, Line 271:
> flake8: E501 line too long (164 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@299
PS2, Line 299:
> flake8: E501 line too long (164 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@436
PS2, Line 436: );
> flake8: W293 blank line contains whitespace
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@436
PS2, Line 436:
> remove spaces
Done
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@507
PS2, Line 507:
> flake8: E501 line too long (92 > 90 characters)
Done
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 3
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Fri, 13 Jun 2025 21:19:34 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 965 insertions(+), 64 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/7
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 7
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 5:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@308
PS5, Line 308: Ensure
Check if 'table' property is not null and not empty
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@350
PS5, Line 350: int limit = -1;
: if (params.isSetLimit()) limit = (int) params.getLimit();
: iterator_ = dbAccessor_.getRecordIterator(tableConfig_, limit, 0);
: } else {
: totalNumberOfRecords_ = dbAccessor_.getTotalNumberOfRecords(tableConfig_);
indentation is off
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java:
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java@27
PS5, Line 27: import org.apache.hadoop.hive.ql.metadata.Hive;
Is this import needed?
http://gerrit.cloudera.org:8080/#/c/22865/5/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/5/tests/custom_cluster/test_ext_data_sources.py@a290
PS5, Line 290:
Don't remove this part when merging
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 5
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Mon, 16 Jun 2025 17:37:49 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 21:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20759/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 21
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 16:10:41 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#21). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,300 insertions(+), 76 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/21
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 21
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#6). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 965 insertions(+), 64 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/6
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 6
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 3:
(1 comment)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@307
PS3, Line 307: if (!Strings.isNullOrEmpty(tableName)) { // Ensure 'table' property is not null or empty
line too long (92 > 90)
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 3
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Fri, 13 Jun 2025 21:20:58 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 19: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 19
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 15:17:34 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 22: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 22
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 21:34:28 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#8). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 986 insertions(+), 95 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/8
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 8
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 4:
(1 comment)
> Uploaded patch set 4.
http://gerrit.cloudera.org:8080/#/c/22865/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@307
PS3, Line 307: String tableName = tableConfig_.get(JdbcStorageConfig.TABLE.getPropertyName());
> line too long (92 > 90)
Done
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 4
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Sat, 14 Jun 2025 20:30:30 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 17:
(15 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/17/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/17/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@355
PS17, Line 355: // Make jdbc table name to be quoted with double quotes if columnMapping is not empty
line too long (91 > 90)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@177
PS17, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
flake8: E302 expected 2 blank lines, found 1
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@343
PS17, Line 343: +
flake8: E226 missing whitespace around arithmetic operator
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@349
PS17, Line 349: +
flake8: E226 missing whitespace around arithmetic operator
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@352
PS17, Line 352: t
flake8: F821 undefined name 'traceback'
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@355
PS17, Line 355: )
flake8: E501 line too long (91 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@356
PS17, Line 356: d
flake8: E501 line too long (100 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@357
PS17, Line 357: a
flake8: E501 line too long (97 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@358
PS17, Line 358: n
flake8: E501 line too long (106 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@360
PS17, Line 360: a
flake8: E501 line too long (95 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@361
PS17, Line 361: s
flake8: E501 line too long (93 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@363
PS17, Line 363: v
flake8: U100 Unused argument 'vector'
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@574
PS17, Line 574: v
flake8: U100 Unused argument 'vector'
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@829
PS17, Line 829: v
flake8: U100 Unused argument 'vector'
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@831
PS17, Line 831: r
flake8: E501 line too long (93 > 90 characters)
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 17
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 04:53:43 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 17:
(2 comments)
> Uploaded patch set 17.
Started jenkins job
http://gerrit.cloudera.org:8080/#/c/22865/16/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/16/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@353
PS16, Line 353: sb.append(project);
: sb.append(" FROM ");
: // Make jdbc table name to be quoted with double quotes if columnMapping is not empty
: if (!columnMapping.isEmpty()) {
: tableName = dbAccessor_.getCaseSensitiveName(tableName);
: }
: sb.append(tableName);
: String condition = QueryConditionUtil
: .buildCondition(params.getPredicates(), columnMapping, dbAccessor_);
: if (StringUtils.isNotBlank(condition)) {
: sb.append(" WHERE ").append(condition);
: }
:
: query = sb.toString(
> indent spaces for this block
Done
http://gerrit.cloudera.org:8080/#/c/22865/16/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/16/tests/custom_cluster/test_ext_data_sources.py@213
PS16, Line 213:
> unnecessary space characters
Done
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 17
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 04:53:29 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#19). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,299 insertions(+), 76 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/19
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 19
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 3: Verified-1
Build Failed
https://jenkins.impala.io/job/gerrit-code-review-checks/19482/ : ABORTED
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 3
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Sat, 14 Jun 2025 00:19:30 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#17). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,288 insertions(+), 76 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/17
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 17
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#18). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,297 insertions(+), 76 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/18
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 18
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 20:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22865/19/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/19/tests/custom_cluster/test_ext_data_sources.py@177
PS19, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
> flake8: E302 expected 2 blank lines, found 1
it asked to add a black line in front of line 177, not after
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 20
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 15:31:06 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 21: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 21
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 16:50:35 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 4: Verified-1
Build Failed
https://jenkins.impala.io/job/gerrit-code-review-checks/19492/ : ABORTED
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 4
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Sat, 14 Jun 2025 23:29:19 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 8:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19645/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 8
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Sun, 29 Jun 2025 11:59:10 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 19:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20757/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 19
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:36:03 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 20:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20758/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 20
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 15:54:10 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Reviewed-on: http://gerrit.cloudera.org:8080/22865
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,300 insertions(+), 76 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 23
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/19264/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 2
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 May 2025 07:34:13 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 968 insertions(+), 70 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/3
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 3
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 8:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java
File fe/src/main/java/org/apache/impala/catalog/TableLoader.java:
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@240
PS7, Line 240: table != null
if (!Strings.isNullOrEmpty(table)) {
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@243
PS7, Line 243: if (query != null) {
if (!Strings.isNullOrEmpty(query)) {
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@232
PS7, Line 232: String table = msTbl.getParameters().get("hive.sql.table");
: String query = msTbl.getParameters().get("hive.sql.query");
:
: if (Strings.isNullOrEmpty(table) && Strings.isNullOrEmpty(query)) {
: throw new TableLoadingException("Either 'hive.sql.table' or" +
: " 'hive.sql.query' must be set.");
: }
:
: if (table != null) {
: impala_tbl_props.put("table", table);
: }
: if (query != null) {
: impala_tbl_props.put("query", query);
: }
> @Wenzhe, do we give an error when both the properties are mentioned or shou
No, if both properties are set, "query" has higher priority than "table"
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 8
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 01 Jul 2025 18:41:50 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 7:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java
File fe/src/main/java/org/apache/impala/catalog/TableLoader.java:
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@232
PS7, Line 232: String table = msTbl.getParameters().get("hive.sql.table");
: String query = msTbl.getParameters().get("hive.sql.query");
:
: if (Strings.isNullOrEmpty(table) && Strings.isNullOrEmpty(query)) {
: throw new TableLoadingException("Either 'hive.sql.table' or" +
: " 'hive.sql.query' must be set.");
: }
:
: if (table != null) {
: impala_tbl_props.put("table", table);
: }
: if (query != null) {
: impala_tbl_props.put("query", query);
: }
Please check for all possibilities.
if (Strings.isNullOrEmpty(table) && Strings.isNullOrEmpty(query)) {
...
} else if (table != null && query != null) {
...
} else if (table != null) {
impala_tbl_props.put("table", table);
} else {
impala_tbl_props.put("query", query);
}
Please add negative test where both "hive.sql.table" and "hive.sql.query" is set.
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/7/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@325
PS7, Line 325: // Make jdbc table name to be quoted with double quotes if columnMapping is not empty
: if (!columnMapping.isEmpty()) {
: tableName = dbAccessor_.getCaseSensitiveName(tableName);
: }
: sb.append(tableName);
: String condition = QueryConditionUtil
: .buildCondition(params.getPredicates(), columnMapping, dbAccessor_);
: if (StringUtils.isNotBlank(condition)) {
: sb.append(" WHERE ").append(condition);
: }
:
: query = sb.toString();
Indentation still off here. Need two more spaces.
Try use clang-format to auto format the code.
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65147115#ContributingtoImpala-Fix
http://gerrit.cloudera.org:8080/#/c/22865/7/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/7/tests/custom_cluster/test_ext_data_sources.py@543
PS7, Line 543: assert "SET MAX_ERRORS=10000" in response_json, \
: "No matching option MAX_ERRORS found in the queries site."
: assert "SET MEM_LIMIT=1000000000" in response_json, \
: "No matching option MEM_LIMIT found in the queries site."
: assert "SET ENABLED_RUNTIME_FILTER_TYPES=\\\"BLOOM,MIN_MAX\\\"" in response_json or \
: "SET ENABLED_RUNTIME_FILTER_TYPES='BLOOM,MIN_MAX'" in response_json, \
: "No matching option ENABLED_RUNTIME_FILTER_TYPES found in the queries site."
: assert "SET QUERY_TIMEOUT_S=600" in response_json, \
: "No matching option QUERY_TIMEOUT_S found in the queries site."
: assert "SET REQUEST_POOL=\\\"default-pool\\\"" in response_json, \
: "No matching option REQUEST_POOL found in the queries site."
: assert "SET DEBUG_ACTION" not in response_json, \
: "Matching option DEBUG_ACTION found in the queries site."
Unnecessary changes?
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 7
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 17 Jun 2025 23:17:12 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 19:
(2 comments)
> Uploaded patch set 19.
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py@177
PS18, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
> flake8: E302 expected 2 blank lines, found 1
Done
http://gerrit.cloudera.org:8080/#/c/22865/18/tests/custom_cluster/test_ext_data_sources.py@368
PS18, Line 368:
> flake8: E501 line too long (93 > 90 characters)
Done
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 19
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:17:26 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 18:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20756/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 18
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:33:53 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M tests/custom_cluster/test_ext_data_sources.py
9 files changed, 970 insertions(+), 70 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/4
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 4
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 2:
(12 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/catalog/TableLoader.java
File fe/src/main/java/org/apache/impala/catalog/TableLoader.java:
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/catalog/TableLoader.java@235
PS2, Line 235: throw new TableLoadingException("Either 'hive.sql.table' or 'hive.sql.query' must be set.");
line too long (98 > 90)
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java:
http://gerrit.cloudera.org:8080/#/c/22865/2/fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java@110
PS2, Line 110: "For non-Hive JDBC tables, either 'table' or 'query' property must be set.");
line too long (95 > 90)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@84
PS2, Line 84: r
flake8: E501 line too long (96 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@85
PS2, Line 85: D
flake8: E501 line too long (105 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@100
PS2, Line 100: t
flake8: E501 line too long (97 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@124
PS2, Line 124: r
flake8: E501 line too long (96 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@125
PS2, Line 125: J
flake8: E501 line too long (109 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@271
PS2, Line 271: t
flake8: E501 line too long (164 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@299
PS2, Line 299: t
flake8: E501 line too long (164 > 90 characters)
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@436
PS2, Line 436:
flake8: W293 blank line contains whitespace
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@436
PS2, Line 436:
line has trailing whitespace
http://gerrit.cloudera.org:8080/#/c/22865/2/tests/custom_cluster/test_ext_data_sources.py@507
PS2, Line 507: )
flake8: E501 line too long (92 > 90 characters)
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 2
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 May 2025 07:07:43 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 6:
Please rebase this patch to pick up IMPALA-14144 (Make pip_download.py more tolerant with PEP 503 simple pages).
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 6
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 17 Jun 2025 16:02:36 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/5/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@316
PS5, Line 316: project = schema_.getCols().stream().map(
: TColumnDesc::getName).map(
: name -> columnMapping.getOrDefault(name, name))
: .collect(Collectors.joining(", "));
: }
: sb.append(project);
: sb.append(" FROM ");
:
: // Make jdbc table name to be quoted with double quotes if columnMapping is not empty
: if (!columnMapping.isEmpty()) {
: tableName = dbAccessor_.getCaseSensitiveName(tableName);
: }
: sb.append(tableName);
:
: String condition = QueryConditionUtil
: .buildCondition(params.getPredicates(), columnMapping, dbAccessor_);
: if (StringUtils.isNotBlank(condition)) {
: sb.append(" WHERE ").append(condition);
: }
:
: query = sb.toString();
indentation is off here.
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 5
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Mon, 16 Jun 2025 16:57:38 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 18:
(14 comments)
> Uploaded patch set 18.
http://gerrit.cloudera.org:8080/#/c/22865/17/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
File fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java:
http://gerrit.cloudera.org:8080/#/c/22865/17/fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java@355
PS17, Line 355: // Make jdbc table name to be quoted with double quotes if
> line too long (91 > 90)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@343
PS17, Line 343:
> flake8: E226 missing whitespace around arithmetic operator
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@349
PS17, Line 349:
> flake8: E226 missing whitespace around arithmetic operator
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@352
PS17, Line 352:
> flake8: F821 undefined name 'traceback'
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@355
PS17, Line 355:
> flake8: E501 line too long (91 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@356
PS17, Line 356:
> flake8: E501 line too long (100 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@357
PS17, Line 357:
> flake8: E501 line too long (97 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@358
PS17, Line 358:
> flake8: E501 line too long (106 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@360
PS17, Line 360:
> flake8: E501 line too long (95 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@361
PS17, Line 361:
> flake8: E501 line too long (93 > 90 characters)
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@363
PS17, Line 363: _
> flake8: U100 Unused argument 'vector'
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@574
PS17, Line 574: t
> flake8: U100 Unused argument 'vector'
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@829
PS17, Line 829:
> flake8: U100 Unused argument 'vector'
Done
http://gerrit.cloudera.org:8080/#/c/22865/17/tests/custom_cluster/test_ext_data_sources.py@831
PS17, Line 831:
> flake8: E501 line too long (93 > 90 characters)
Done
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 18
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 05:07:41 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 22: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 22
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 16:51:24 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Pranav Lodha (Code Review)" <ge...@cloudera.org>.
Pranav Lodha has uploaded a new patch set (#20). ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
This patch adds support for the hive.sql.query table property in Hive
JDBC tables accessed through Impala. Impala has support for Hive
JDBC tables using the hive.sql.table property, which limits users
to simple table access. However, many use cases demand the ability
to expose complex joins, filters, aggregations, or derived columns
as external views. Hive.sql.query leads to a custom SQL query that
returns a virtual table(subquery) instead of pointing to a physical
table. These use cases cannot be achieved with just the hive.sql.table
property. This change allows Impala to:
• Interact with views or complex queries defined on external
systems without needing schema-level access to base tables.
• Expose materialized logic (such as filters, joins, or
transformations) via Hive to Impala consumers in a secure,
abstracted way.
• Better align with data virtualization use cases where
physical data location and structure should be hidden from
the querying engine.
This patch also lays the groundwork for future enhancements such
as predicate pushdown and performance optimizations for Hive
JDBC tables backed by queries.
Testing: End-to-end tests are included in
test_ext_data_sources.py.
Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
---
M fe/src/main/java/org/apache/impala/catalog/TableLoader.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/JdbcDataSource.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/DatabaseType.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfigManager.java
M fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/JdbcRecordIterator.java
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-mysql-tables.test
M testdata/workloads/functional-query/queries/QueryTest/hive-jdbc-postgres-tables.test
M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test
M tests/custom_cluster/test_ext_data_sources.py
10 files changed, 1,300 insertions(+), 76 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/65/22865/20
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 20
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[Impala-ASF-CR] IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22865 )
Change subject: IMPALA-13869: Support for 'hive.sql.query' property for Hive JDBC tables
......................................................................
Patch Set 20:
(2 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python3 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with Python3's venv installed.
http://gerrit.cloudera.org:8080/#/c/22865/20/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:
http://gerrit.cloudera.org:8080/#/c/22865/20/tests/custom_cluster/test_ext_data_sources.py@177
PS20, Line 177: class TestPostgresJdbcTables(CustomClusterTestSuite):
flake8: E302 expected 2 blank lines, found 1
http://gerrit.cloudera.org:8080/#/c/22865/20/tests/custom_cluster/test_ext_data_sources.py@180
PS20, Line 180: @
flake8: E303 too many blank lines (2)
--
To view, visit http://gerrit.cloudera.org:8080/22865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I039fcc1e008233a3eeed8d09554195fdb8c8706b
Gerrit-Change-Number: 22865
Gerrit-PatchSet: 20
Gerrit-Owner: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 23 Oct 2025 15:29:58 +0000
Gerrit-HasComments: Yes