davecromberge opened a new pull request, #19312:
URL: https://github.com/apache/pinot/pull/19312

   ## Description
   The IntegerSumTupleSketch aggregation functions (`distinctCountTupleSketch`, 
`distinctCountRawIntegerSumTupleSketch`, `sumValuesIntegerSumTupleSketch`, 
`avgValueIntegerSumTupleSketch`) accept an optional second parameters argument 
(e.g. `nominalEntries`) in the single-stage engine, but are registered in 
`AggregationFunctionType` with `OperandTypes.BINARY` (exactly one operand). The 
multi-stage engine therefore rejects the parameterized form at query validation:
   
   ```
   QueryValidationError: Invalid number of arguments to function
   'DISTINCTCOUNTRAWINTEGERSUMTUPLESKETCH'. Was expecting 1 arguments.
   ```
   
   even though the identical query runs on the single-stage engine.
   
   ## Fix
   Register the four tuple-sketch aggregations with the same 1-or-2 operand 
signature (`OperandTypes.family(List.of(ANY, ANY), i -> i == 1)`) already used 
by the CPC sketch functions, so the optional parameters operand is accepted. 
This is a planning-only change; execution, return types, and serialization are 
unchanged.
   
   ## Testing
   `TupleSketchTest` now exercises the 2-argument (parameterized) form across 
both query engines.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to