ClickHouse / ClickHouse/clickhouse-java

Add missing `Hash` output format to `ClickHouseFormat` enum (JDBC/DataGrip throws "No enum constant ... Hash")

Open Beginner friendly
#2,957 1 comment 0 reactions 0 assignees View on GitHub
bug client-api-v2 jdbc-v2
Dominant language
Java
Stars
1.6k
Forks
636
Avg merge
2d 23h
Merged PRs (30d)
29

Description

### Use case
Running a `SELECT ... FORMAT Hash` query through the JDBC driver (e.g. from DataGrip) fails with:

No enum constant com.clickhouse.data.ClickHouseFormat.Hash

The `Hash` output format (https://clickhouse.com/docs/interfaces/formats/Hash) is supported by the ClickHouse server but is not present in the`ClickHouseFormat` [enum](https://github.com/ClickHouse/clickhouse-java/blob/main/clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseFormat.java), so the driver throws before the query is ever sent.

Contributor guide

Open the contributing guide

Research direction

Start in clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseFormat.java and inspect how output formats are represented and parsed. Reproduce the JDBC/DataGrip failure with a SELECT ... FORMAT Hash query, then verify that Hash is recognized without the No enum constant error and that the query can be sent to ClickHouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.