Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19523 +/- ##
============================================
+ Coverage 67.81% 68.00% +0.19%
Complexity 1450 1450
============================================
Files 3506 3515 +9
Lines 227028 227861 +833
Branches 35881 36113 +232
============================================
+ Hits 153969 154967 +998
+ Misses 60903 60665 -238
- Partials 12156 12229 +73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The prior binary check compared a newer merge base with an older event baseline and reported an upstream TableConfig constructor change. Refresh the CI event without changing the reviewed source tree.
xiangfu0
force-pushed
the
xiangfu0/codex/sse-aggregate-type-binding
branch
from
September 19, 2026 09:03
51917af to
f6d20bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR flow
Derives aggregation argument and result types from input schema, binds immutable AggregateCallBinding to functions, and serializes it via Thrift for consistent polymorphic aggregation across query engines.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Partial evidence: 52 file patches omitted; 0 truncated.
Diff evidence
Polymorphic aggregates need a result schema before any rows arrive. Today, explicit SQL type arguments or data-block inference make that contract difficult to preserve through empty results, distributed merges, and logical BOOLEAN/TIMESTAMP values.
This PR derives logical argument and result types from the input schema, carries an immutable
AggregateCallBindingthrough SSE requests and MSE plans, and constructs the aggregate with that binding. SQL names and operands remain unchanged.SQL behavior
For an input schema with
name STRING,enabled BOOLEAN, andeventTime TIMESTAMP:MODE(name)STRINGMODE(eventTime)TIMESTAMPFIRST_WITH_TIME(name, eventTime)STRINGLAST_WITH_TIME(enabled, eventTime)BOOLEANANY_VALUE(enabled)BOOLEANARRAY_AGG(eventTime)TIMESTAMP_ARRAYARRAY_AGG(name, true)STRING_ARRAY, distinct valuesNumeric MODE keeps its DOUBLE result and existing tie reducers; nonnumeric MODE supports MIN/MAX ties. Existing explicit-type FIRST/LAST and ARRAY_AGG overloads remain supported. The existing SSE EXPR_MIN/EXPR_MAX rewrite also preserves logical measuring/projection types, null projections, and all tied rows across serialized merges. Public EXPR_MIN/EXPR_MAX execution remains SSE-only.
Implementation and review order
The same binding must survive request serialization, stage splitting, runtime construction, and broker reduction: a FINAL-stage OBJECT accumulator is not the final SQL type. The cross-module changes also cover expression overrides, gapfill, post-aggregation, direct server SQL, pruned responses, and
LIMIT 0.Providers are discovered once through
ServiceLoader. Another aggregate still needs a declaredAggregationFunctionTypeentry, its validation/type rule, and a provider with the required kernel/serialization support; it does not need new factory, planner-stage, or reducer switch branches. This does not introduce arbitrary SQL names or replace UDAF registration.The diff includes 23 test/fixture files and two generated Thrift files (
AggregationFunctionBinding.javaandFunction.java). Review their schema source inquery.thrift; MSE metadata is declared inexpressions.proto.Compatibility and performance
Validation
7087c4f085, unit, integration, quickstart, Java 11 client, linter, and SSE/MSE query compatibility CI passed. Current head51917aff8ais an empty CI-refresh commit with the identical source tree; the other checks are rerunning.6245210119on master810d7985b7but compared it with the olderf727b44f6esnapshot. It flags the TableConfig constructor changed by #16033. TableConfig's source blob is identical in the tested merge and its master parent, and this PR does not modifypinot-spi. A fresh CI event retained the same old baseline. This needs a CI baseline correction before merge; maintainer approval is also pending.