Skip to content

[Client, JDBC] Support Aggregate Functions #2599

Description

@chernser

Description

There is currently only SimpleAggregate function columns are supported and partially.

Related to dbeaver/dbeaver#29931

Example table:

CREATE TABLE signoz_metrics.exp_hist
(

    `env` LowCardinality(String) DEFAULT 'default',
    `temporality` LowCardinality(String) DEFAULT 'Unspecified',
    `metric_name` LowCardinality(String),
    `fingerprint` UInt64 CODEC(Delta(8), ZSTD(1)),
    `unix_milli` Int64 CODEC(DoubleDelta, ZSTD(1)),
    `count` UInt64 CODEC(ZSTD(1)),
    `sum` Float64 CODEC(Gorilla, ZSTD(1)),
    `min` Float64 CODEC(Gorilla, ZSTD(1)),
    `max` Float64 CODEC(Gorilla, ZSTD(1)),
    `sketch` AggregateFunction(quantilesDD(0.01, 0.5, 0.75, 0.9, 0.95, 0.99), UInt64) CODEC(ZSTD(1))
)
ENGINE = MergeTree
PARTITION BY toDate(unix_milli / 1000)
ORDER BY (env, temporality, metric_name, fingerprint, unix_milli)
TTL toDateTime(unix_milli / 1000) + toIntervalSecond(2592000)
SETTINGS ttl_only_drop_parts = 1,
    index_granularity = 8192; 

Activity

  1. github-actions commented on Sep 24, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

  2. github-actions commented on Oct 25, 2026

    @github-actions

    This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions!

  3. polyglotAI-bot commented on Nov 28, 2026

    @polyglotAI-bot
    Collaborator

    Recommendation: Keep open — maintainer decision
    main reads and writes only groupBitmap states. Decide which other aggregate functions to support, and the Java value for each. #1232 asks for the same since 2023 and can be closed as a duplicate of this issue.

    Analysis: The type-name parser accepts only the function names of the enum ClickHouseAggregateFunction, which has no quantilesDD (clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseAggregateFunction.java:188). For a known name, the reader decodes the state as groupBitmap (BinaryStreamReader.java:292), and the writer rejects all other functions (SerializerUtils.java:1052). docs/clickhouse-docs/jdbc.mdx:1343 documents the groupBitmap limit and the -Merge workaround.

    Automated triage by Polyglot AI. A maintainer makes the final decision.

  4. added
    client
    data-types
    jdbc
    native-format
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientdata-typesenhancementjdbcnative-format

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions