Skip to content

Bug: Accelerated queries using quantilesState #2153

@Defman

Description

@Defman
Image

Generates the following accelerated query, however it uses quantilesMerge instead of quantileMerge which returns an array with a single element instead of a scalar. Using quantilesMerge might be preferred such to accelerate multiple overlapping series.

SELECT
  quantilesMerge (0.99) (quantiles_duration),
  SpanName,
  toStartOfInterval(toDateTime(Timestamp), INTERVAL 1 minute) AS `__hdx_time_bucket`
FROM
  otel_staging.traces_aggregated
WHERE
  (
    Timestamp >= fromUnixTimestamp64Milli(1776928440000)
    AND Timestamp < fromUnixTimestamp64Milli(1776932100000)
  )
GROUP BY
  SpanName,
  toStartOfInterval(toDateTime(Timestamp), INTERVAL 1 minute) AS `__hdx_time_bucket`
ORDER BY
  toStartOfInterval(toDateTime(Timestamp), INTERVAL 1 minute) AS `__hdx_time_bucket`
LIMIT
  100000

Which results in the following error

Error loading chart, please check your query or try again later.

Error Message:

No value columns found in result column metadata. Make sure a numeric column exists in the result set.

Result column metadata: [{"name":"quantilesMerge(0.99)(quantiles_duration)","type":"Array(Float64)"},{"name":"SpanName","type":"LowCardinality(String)"},{"name":"__hdx_time_bucket","type":"DateTime"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions