Skip to content

Trino: Add Trino Docker Compose for integration testing #2220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dingo4dev
Copy link
Contributor

Rationale for this change

This pull request introduces a Trino service to the Docker Compose development environment, addressing the need for broader integration testing capabilities as discussed in issue #2219

Are these changes tested?

Are there any user-facing changes?

@dingo4dev dingo4dev force-pushed the test-trino-integration branch 3 times, most recently from fdb090e to 04d1f61 Compare July 21, 2025 18:17
Adds a Docker Compose configuration for setting up Trino with Iceberg, including support for Hive Metastore and REST catalog types. This allows for easier testing and development with Trino and Iceberg.

closes apache#2219
- Introduced new tests for registering tables and schema existence in Trino.
- Added Trino connection fixtures to support integration testing.
- Updated `pyproject.toml` to include the Trino dependency.
- Enhanced the Makefile with a new command to run Trino integration tests.
Add Trino as alternative tool for test uuid partitions as Java Iceberg 1.9.2 in spark is not yet supported.
<!--related to apache#2002-->
@dingo4dev dingo4dev force-pushed the test-trino-integration branch from 04d1f61 to a0e1a11 Compare July 22, 2025 19:01
@dingo4dev dingo4dev marked this pull request as ready for review July 22, 2025 19:02
@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 19:02
@dingo4dev dingo4dev changed the title [WIP] Trino: Add Trino Docker Compose for integration testing Trino: Add Trino Docker Compose for integration testing Jul 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces Trino integration testing capabilities to the PyIceberg project by adding Docker Compose configuration and test fixtures for Trino services. The changes enable testing of Iceberg operations through Trino's SQL interface to ensure compatibility and proper integration between PyIceberg and Trino.

Key changes include:

  • Added Trino Docker services configuration with both REST and Hive catalog support
  • Introduced new test fixtures for Trino database connections
  • Created integration tests that verify PyIceberg operations work correctly with Trino

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/integration/test_writes/test_writes.py Added new Trino-specific UUID partitioning test and skipped existing Spark test
tests/integration/test_rest_catalog.py Added test to verify Iceberg namespace appears as Trino schema
tests/integration/test_register_table.py Added test to verify table registration works with Trino
tests/conftest.py Added Trino connection fixtures and command-line options
pyproject.toml Added Trino dependency and integration test marker
dev/trino/catalog/*.properties Trino catalog configuration files for REST and Hive catalogs
dev/run-trino.sh Shell script to manage Trino Docker services
dev/docker-compose-trino.yml Standalone Trino Docker Compose configuration
dev/docker-compose-integration.yml Added Trino service to main integration environment
Makefile Added target for running Trino integration tests
Comments suppressed due to low confidence (2)

tests/integration/test_register_table.py:109

  • [nitpick] The test doesn't handle the case where Trino connection might fail or timeout. Consider adding error handling or retries for database connectivity issues that could make the test flaky.
    assert table_name in inspect(trino_conn).get_table_names(schema=namespace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant