nitinware opened a new pull request, #41753:
URL: https://github.com/apache/beam/pull/41753
Adds bounded read support to the existing Java ClickHouseIO connector,
producing schema-aware Beam Rows.
Closes #40048.
### Read modes
- Single-query reads through `withQuery()`.
- Parallel table reads using non-nullable `Int32` or `Int64` partition
columns.
- Inclusive `[lowerBound, upperBound]` read bounds, with non-overlapping
partitions.
Both modes require a caller-supplied Beam schema. In table mode, schema
fields also select the columns retrieved; the partition column can be excluded
from the output.
### Implementation
- No database connection during pipeline construction.
- Worker-side result-schema and partition-column validation.
- Typed range parameters and quoted SQL identifiers.
- Resource cleanup on success, failure, and interruption.
- Original client/server exception causes preserved; downstream exceptions
propagate unchanged.
- Javadocs, usage examples, changelog, and connector listing updated.
### Validation
- 227 module unit tests passed.
- 51 Testcontainers integration tests passed, including existing write tests.
- Full module build passed, including formatting, Checkstyle, SpotBugs,
dependency analysis, and Javadocs.
- The final test-only cleanup passed all 30 affected tests and style checks.
Integration coverage includes supported types, schema projection, nullable
values, duplicate preservation, inclusive and extreme bounds, empty partitions,
skewed data, failure handling, and write/read round trips.
To run the table-read integration tests locally, with Docker running:
./gradlew :sdks:java:io:clickhouse:integrationTest \
--tests org.apache.beam.sdk.io.clickhouse.ClickHouseTableReadIT
### Limitations
- Partition queries do not share a globally consistent snapshot.
- Partition concurrency depends on the runner; skew may produce uneven
workloads.
- Effective partition count is limited to 10,000.
- FixedString, UInt64, Decimal, DateTime32, DateTime64, and complex types
are deferred.
- Runtime secret resolution is deferred; supplied credentials may be
serialized into the pipeline graph.
Design document:
https://docs.google.com/document/d/1oxBZg8oZVfsgYcMkRagdNekiS58GMkbH/edit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]