apache / apache/beam

[Bug]: Missing Type Implementations in parseDefaultExpression for ClickHouseIO

Open
#33,692 3 comments 0 reactions 0 assignees View on GitHub
bug io P2 pinned
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

The [parseDefaultExpression](https://github.com/apache/beam/blob/master/sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java#L315) function is missing implementations for the following ClickHouse types:

* `DateTime`
* `Array` (including nested)
* `Tuple`
* `Float32`
* `Float64`
This omission results in errors or unhandled cases when attempting to parse default expressions for these types.

## Suggested Improvement:
Generalize the parseDefaultExpression function to handle any string-based conversion into the appropriate Java representation that ClickHouse expects. This would make the function more robust and capable of supporting future type additions without requiring frequent updates.

## Steps to Reproduce:

Call the parseDefaultExpression function with a value and a column type that matches any of the unsupported types listed above.
Observe that the function either fails or returns an incorrect result.

### Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

### Issue Components

- [ ] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [x] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.