Anubhav Jindal has posted comments on this change. ( 
https://gerrit.cloudera.org/25393 )

Change subject: IMPALA-15762: Add OpenSearch as an External Data Source
......................................................................


Patch Set 3:

(9 comments)

https://gerrit.cloudera.org/#/c/25393/3//COMMIT_MSG
Commit Message:

https://gerrit.cloudera.org/#/c/25393/3//COMMIT_MSG@27
PS3, Line 27: Change-Id: Ifbd4c0a06e6422f06a8270bf652d91a73a714de7
Please add Assisted-by tag in case this change was assisted by an AI agent.


https://gerrit.cloudera.org/#/c/25393/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/OpenSearchDatabaseAccessor.java
File 
fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/OpenSearchDatabaseAccessor.java:

https://gerrit.cloudera.org/#/c/25393/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/OpenSearchDatabaseAccessor.java@96
PS3, Line 96:       conn.close();
conn.close() returns the connection to the pool, but the default 
clean_dbcp_ds_cache=true drops that pool at the end of prepare() and again 
after the scan. Reuse only happens if that option is turned off, and 
maxConnLifetimeMillis will not notice an idle HTTP socket the server already 
closed. The driver's isValid() always returns true, so the next query can 
borrow a dead connection. Keep invalidating, or validate before reuse.


https://gerrit.cloudera.org/#/c/25393/3/fe/src/main/java/org/apache/impala/extdatasource/jdbc/dao/OpenSearchDatabaseAccessor.java@120
PS3, Line 120:      *     
[?property-key=valu][&property-key2=value2]..[&property-keyN=valueN]
nit: Typo in [?property-key=valu]


https://gerrit.cloudera.org/#/c/25393/3/testdata/bin/download-opensearch-jdbc-driver.sh
File testdata/bin/download-opensearch-jdbc-driver.sh:

https://gerrit.cloudera.org/#/c/25393/3/testdata/bin/download-opensearch-jdbc-driver.sh@47
PS3, Line 47: wget 
"https://repo1.maven.org/maven2/org/opensearch/driver/opensearch-sql-jdbc/${DRIVER_JAR_VERSION}/${OPENSEARCH_DRIVER_JAR_FILENAME}";
Please wrap these lines


https://gerrit.cloudera.org/#/c/25393/3/testdata/bin/setup-opensearch-env.sh
File testdata/bin/setup-opensearch-env.sh:

https://gerrit.cloudera.org/#/c/25393/3/testdata/bin/setup-opensearch-env.sh@124
PS3, Line 124: os_curl -f -X POST 
"https://localhost:${OPENSEARCH_PORT}/${OPENSEARCH_INDEX}/_bulk?refresh=true"; \
Please wrap this line


https://gerrit.cloudera.org/#/c/25393/3/testdata/bin/setup-opensearch-env.sh@141
PS3, Line 141: os_curl -f -X POST 
"https://localhost:${OPENSEARCH_PORT}/${OPENSEARCH_BIG_INDEX}/_bulk?refresh=true";
 \
Same, please wrap this line


https://gerrit.cloudera.org/#/c/25393/3/testdata/workloads/functional-query/queries/QueryTest/opensearch-ext-jdbc-tables.test
File 
testdata/workloads/functional-query/queries/QueryTest/opensearch-ext-jdbc-tables.test:

https://gerrit.cloudera.org/#/c/25393/3/testdata/workloads/functional-query/queries/QueryTest/opensearch-ext-jdbc-tables.test@67
PS3, Line 67: # LIMIT is appended to the query sent to OpenSearch.
This LIMIT never reaches OpenSearch. DataSourceScanNode::Open() does not set 
TOpenParams.limit, and the scan always calls getRecordIterator(..., offset 0). 
Impala applies the limit after the read. addLimitAndOffsetToQuery() is only hit 
by the unit test. Worth saying that here


https://gerrit.cloudera.org/#/c/25393/3/testdata/workloads/functional-query/queries/QueryTest/opensearch-ext-jdbc-tables.test@95
PS3, Line 95: # limit (200) and the JDBC fetch size (1000), to check that 
paging returns every row.
count(id) / sum(id) only come back as 1200 if the driver pages. JDBC 1.4.0.1 
follows a cursor, but the OpenSearch 2.19 V2 SQL engine often does not return 
one and stops at plugins.query.size_limit (200). Please run this exhaustive 
test. If you get 200 rows, raise that limit above 1200 on the test server.


https://gerrit.cloudera.org/#/c/25393/3/tests/custom_cluster/test_ext_data_sources.py
File tests/custom_cluster/test_ext_data_sources.py:

https://gerrit.cloudera.org/#/c/25393/3/tests/custom_cluster/test_ext_data_sources.py@1394
PS3, Line 1394:         pytest.xfail(reason="Failed to setup OpenSearch testing 
environment")
This hides a real setup failure. If setup_class throws, teardown_class does not 
run, so a container left up by a failed bulk load or keystore step stays up. 
Clean up in a finally, and fail instead of xfail.



--
To view, visit https://gerrit.cloudera.org/25393
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbd4c0a06e6422f06a8270bf652d91a73a714de7
Gerrit-Change-Number: 25393
Gerrit-PatchSet: 3
Gerrit-Owner: Gokul Kolady <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Comment-Date: Thu, 19 Nov 2026 22:31:56 +0000
Gerrit-HasComments: Yes

Reply via email to