Jackie-Jiang commented on code in PR #16868:
URL: https://github.com/apache/pinot/pull/16868#discussion_r2558023867


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/aggregator/ValueAggregator.java:
##########
@@ -49,11 +49,28 @@ public interface ValueAggregator<R, A> {
   A getInitialAggregatedValue(@Nullable R rawValue);

Review Comment:
   Seems we can deprecate this method as long as `A applyRawValue(A value, R 
rawValue);`



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/aggregator/ValueAggregator.java:
##########
@@ -49,11 +49,28 @@ public interface ValueAggregator<R, A> {
   A getInitialAggregatedValue(@Nullable R rawValue);
 
   /**
-   * Applies a raw value to the current aggregated value.
+   * Returns the initial aggregated value with the optional source data type 
provided for correct raw value handling.
+   * Default implementation delegates to {@link 
#getInitialAggregatedValue(Object)} for backward compatibility.
+   */
+  default A getInitialAggregatedValue(@Nullable R rawValue, @Nullable DataType 
sourceDataType) {

Review Comment:
   Star-tree builder can also be switched to use the new set of methods



-- 
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