Caideyipi commented on PR #18171: URL: https://github.com/apache/iotdb/pull/18171#issuecomment-5125729910
@PDGGK Thanks for checking. Your understanding in the second point is correct; one clarification on the first point: 1. A null entry passed to `processTsBlocks` is not temporary. `AbstractConsumeAllOperator.prepareInput()` only lets `AggregationOperator` proceed with a null entry after the corresponding child has finished. If an active child is blocked or returns a null/empty block, `prepareInput()` returns false and aggregation waits. Also, the aggregator is reset before processing each time window. Therefore, returning here leaves the accumulator in its freshly reset/empty state for that window: no state from the previous window is retained, and no later non-null block is expected from the finished child. The output follows the normal empty-input semantics (for example, `COUNT` outputs 0 and nullable aggregates output null). 2. Each `InputLocation[]` represents one complete intermediate tuple for a single logical aggregation input. `calcInputLocationList()` matches the partial-result columns at the same occurrence index in the layout, while `makeLayout()` records those occurrences child by child. The intermediate columns belonging to one partial result are emitted together by the same child; contributions from different children become separate `InputLocation[]` entries. Thus, all locations in one array have the same `tsBlockIndex`. If that block is null, the whole tuple is absent, so skipping that group is correct. Thanks for the careful review! -- 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]
