Skip to content

fix(functions): respect tdigest weighted state weight#19952

Merged
forsaken628 merged 6 commits into
databendlabs:mainfrom
forsaken628:fix-aggr
Jun 18, 2026
Merged

fix(functions): respect tdigest weighted state weight#19952
forsaken628 merged 6 commits into
databendlabs:mainfrom
forsaken628:fix-aggr

Conversation

@forsaken628

@forsaken628 forsaken628 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Fix quantile_tdigest_weighted state serialization by making QuantileTDigestState track the real accumulated weight instead of counting each weighted input as 1. This keeps the state consistent before and after serialize/merge round trips.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions Bot added the pr-bugfix this PR patches a bug in codebase label Jun 3, 2026
@forsaken628 forsaken628 requested review from KKould and sundy-li June 3, 2026 01:45
@forsaken628 forsaken628 added the ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits label Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docker Image for PR

  • tag: pr-19952-a06c85a-1781499302

note: this image tag is only available for internal use.

@github-actions

Copy link
Copy Markdown
Contributor

@forsaken628 forsaken628 added this pull request to the merge queue Jun 17, 2026
@forsaken628 forsaken628 removed this pull request from the merge queue due to a manual request Jun 17, 2026
@forsaken628

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49e7c29540

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/query/functions/src/aggregates/aggregate_quantile_tdigest.rs
@forsaken628 forsaken628 added this pull request to the merge queue Jun 18, 2026
Merged via the queue into databendlabs:main with commit 359d0e7 Jun 18, 2026
176 of 178 checks passed
@forsaken628 forsaken628 deleted the fix-aggr branch June 18, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants