This is an automated email from the ASF dual-hosted git repository.

Gabriel39 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 4b01aca360f [fix](regression) Publish Trino JDBC fixture port and 
check SQL readiness (#69112)
4b01aca360f is described below

commit 4b01aca360f4841960f6969c36ce243cf224572d
Author: Gabriel <[email protected]>
AuthorDate: Thu Oct 15 16:18:11 2026 +0800

    [fix](regression) Publish Trino JDBC fixture port and check SQL readiness 
(#69112)
    
    ### What problem does this PR solve?
    
    When `enableTrinoJdbcTest=true`, `test_trino_timestamp_query_tvf`
    creates a JDBC catalog pointing to `<docker-host>:8080`. The Iceberg
    stack runs Trino 482 but does not publish its container port, so FE
    fails the catalog connectivity check with `Connection refused` before
    any timestamp query executes. `test_trino_uuid_predicates` uses the same
    endpoint.
    
    Publish `TRINO_JDBC_PORT:8080`, retaining the existing regression
    default of 8080 and allowing an override for shared hosts. Replace the
    filesystem/CLI-presence health check with `SELECT 1`, so Compose
    `--wait` waits for a query-ready server. Document the matching
    regression settings. The image already supplies the required `memory`
    catalog.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test:
    - [x] Manual test: confirmed the original Compose configuration has no
    published Trino port; checked default and overridden port mappings with
    `docker compose config`.
    - [x] Started an isolated Trino 482 service from the rendered
    configuration and waited for its SQL health check to pass.
    - [x] Connected through the published host port using the same Trino
    JDBC 435 driver as the suites. Verified `WITH SESSION` timestamp queries
    with/without a CTE in UTC and Asia/Shanghai, and memory-catalog UUID
    inserts plus equality, IN, range, BETWEEN and NULL predicates.
    - Full Doris Groovy regressions were not run locally; the manual checks
    cover fixture readiness, connectivity and remote SQL prerequisites.
    - Behavior changed:
    - [x] Yes: the test fixture publishes its configurable JDBC port and
    waits for SQL readiness. Doris runtime behavior is unchanged.
    - Does this need documentation?
    - [x] Yes: updated the fixture README and regression configuration
    comments in this PR.
---
 .../thirdparties/docker-compose/iceberg/README.md  | 22 ++++++++++++++++++++++
 .../docker-compose/iceberg/iceberg.env             |  1 +
 .../docker-compose/iceberg/iceberg.yaml.tpl        |  5 ++++-
 regression-test/conf/regression-conf.groovy        |  3 ++-
 4 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/docker/thirdparties/docker-compose/iceberg/README.md 
b/docker/thirdparties/docker-compose/iceberg/README.md
index 41d82b2affd..bf0f2693e65 100644
--- a/docker/thirdparties/docker-compose/iceberg/README.md
+++ b/docker/thirdparties/docker-compose/iceberg/README.md
@@ -24,6 +24,28 @@ tools:
     save_docker.sh: save the current docker state
 ```
 
+## Trino JDBC regressions
+
+The Iceberg stack publishes Trino on `TRINO_JDBC_PORT` (8080 by default in
+`iceberg.env`). The health check executes `SELECT 1`, so startup with `--wait`
+waits for Trino to accept queries.
+
+To run `test_trino_timestamp_query_tvf` and `test_trino_uuid_predicates`, start
+the stack with `docker/thirdparties/run-thirdparties-docker.sh -c iceberg` and
+set these regression options:
+
+```groovy
+enableTrinoJdbcTest = true
+externalEnvIp = "<docker-host>"
+trino_jdbc_port = 8080
+```
+
+Both FE and BE must be able to reach the Docker host at that port. If the host
+port is already occupied, change `TRINO_JDBC_PORT` in `iceberg.env`, recreate
+the Trino container, and use the same value for `trino_jdbc_port`. Trino's
+container port remains 8080. The pinned Trino image supports `WITH SESSION`
+and includes the `memory` catalog used by the UUID regression.
+
 ## Run on Apple Silicon macOS
 
 Install Docker Desktop and Bash 4 or newer first. The macOS system Bash
diff --git a/docker/thirdparties/docker-compose/iceberg/iceberg.env 
b/docker/thirdparties/docker-compose/iceberg/iceberg.env
index dfaa5f962a0..ec1ad6c2807 100644
--- a/docker/thirdparties/docker-compose/iceberg/iceberg.env
+++ b/docker/thirdparties/docker-compose/iceberg/iceberg.env
@@ -20,6 +20,7 @@ NOTEBOOK_SERVER_PORT=8888
 SPARK_DRIVER_UI_PORT=8080
 SPARK_HISTORY_UI_PORT=10000
 SPARK_THRIFT_PORT=11000
+TRINO_JDBC_PORT=8080
 REST_CATALOG_PORT=18181
 MINIO_UI_PORT=9000
 MINIO_API_PORT=19001
diff --git a/docker/thirdparties/docker-compose/iceberg/iceberg.yaml.tpl 
b/docker/thirdparties/docker-compose/iceberg/iceberg.yaml.tpl
index de392befe8a..774c83a5db3 100644
--- a/docker/thirdparties/docker-compose/iceberg/iceberg.yaml.tpl
+++ b/docker/thirdparties/docker-compose/iceberg/iceberg.yaml.tpl
@@ -140,6 +140,9 @@ services:
   trino:
     image: trinodb/trino:482
     container_name: doris--iceberg-trino
+    # JDBC regressions connect from FE/BE outside this Compose network.
+    ports:
+      - ${TRINO_JDBC_PORT:-8080}:8080
     depends_on:
       rest:
         condition: service_started
@@ -149,7 +152,7 @@ services:
     networks:
       - doris--iceberg
     healthcheck:
-      test: ["CMD-SHELL", "test -d /etc/trino/catalog && command -v trino 
>/dev/null"]
+      test: ["CMD", "trino", "--server", "http://localhost:8080";, "--execute", 
"SELECT 1"]
       interval: 5s
       timeout: 60s
       retries: 120
diff --git a/regression-test/conf/regression-conf.groovy 
b/regression-test/conf/regression-conf.groovy
index cfb84d77fb7..6a5104a4f4f 100644
--- a/regression-test/conf/regression-conf.groovy
+++ b/regression-test/conf/regression-conf.groovy
@@ -274,7 +274,8 @@ s3ExportBucketName = ""
 
 externalEnvIp="127.0.0.1"
 
-// Optional Trino server for JDBC TVF regression (WITH SESSION requires a 
supporting Trino version).
+// Optional Trino JDBC regressions use the Trino service in the Iceberg Docker 
stack.
+// Match trino_jdbc_port to its published TRINO_JDBC_PORT and externalEnvIp to 
the Docker host.
 enableTrinoJdbcTest = false
 trino_jdbc_port = 8080
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to