gianm opened a new pull request, #16564:
URL: https://github.com/apache/druid/pull/16564

   PR #15371 eliminated ObjectColumnSelector's built-in implementations of 
numeric methods, which had been marked deprecated.
   
   However, some complex types, like SpectatorHistogram, can be successfully 
coerced to number. The documentation for spectator histograms encourages taking 
advantage of this by aggregating complex columns with doubleSum and longSum. 
Currently, this doesn't work properly for IncrementalIndex, where the behavior 
relied on those deprecated ObjectColumnSelector methods.
   
   This patch fixes the behavior by making two changes:
   
   1) SimpleXYZAggregatorFactory (XYZ = type; base class for simple numeric 
aggregators;
      all of these extend NullableNumericAggregatorFactory) use getObject for 
STRING
      and COMPLEX. Previously, getObject was only used for STRING.
   
   2) NullableNumericAggregatorFactory (base class for simple numeric 
aggregators)
      has a new protected method "useGetObject". This allows the base class to
      correctly check for null (using getObject or isNull).
   
   The patch also adds a test for SpectatorHistogram + doubleSum + 
IncrementalIndex. Thanks @bsyk for the test, which I pulled from #16562.


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