druid/extensions-contrib
Gian Merlino b2a88da200
Attempt to coerce COMPLEX to number in numeric aggregators. (#16564)
* Coerce COMPLEX to number in numeric aggregators.

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.

* Fix tests.

* Remove the special ColumnValueSelector.

* Add test.
2024-07-25 08:45:29 -07:00
..
aliyun-oss-extensions Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
ambari-metrics-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
cassandra-storage Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
cloudfiles-extensions Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
compressed-bigdecimal Correct aggregators violating names (#16615) 2024-07-12 09:18:09 +02:00
ddsketch Revert "Downgrade the version of Apache Curator from 5.5.0 to 5.3.0 to avoid a bug in the new version (#16425)" (#16688) 2024-07-03 11:18:50 +05:30
distinctcount Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
dropwizard-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
druid-deltalake-extensions Add missing `delta-storage` dependency and class loader workaround to Delta table ingestion (#16648) 2024-06-25 09:16:13 -07:00
druid-iceberg-extensions IcebergInputSource : Add option to toggle case sensitivity while reading columns from iceberg catalog (#16496) 2024-05-31 10:18:52 -07:00
gce-extensions Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
graphite-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
influx-extensions Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
influxdb-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
kafka-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
kubernetes-overlord-extensions Add annotation for pod template (#16772) 2024-07-23 07:25:15 -07:00
materialized-view-maintenance remove Firehose and FirehoseFactory (#16758) 2024-07-19 14:37:21 -07:00
materialized-view-selection Remove index_realtime and index_realtime_appenderator tasks (#16602) 2024-06-24 20:13:33 -07:00
momentsketch Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
moving-average-query Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
opentelemetry-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
opentsdb-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
prometheus-emitter remove Firehose and FirehoseFactory (#16758) 2024-07-19 14:37:21 -07:00
rabbit-stream-indexing-service Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
redis-cache Remove incorrect utf8 conversion of ResultCache keys (#16569) 2024-06-12 13:12:05 -07:00
spectator-histogram Attempt to coerce COMPLEX to number in numeric aggregators. (#16564) 2024-07-25 08:45:29 -07:00
sqlserver-metadata-storage Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
statsd-emitter Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
tdigestsketch Correct aggregators violating names (#16615) 2024-07-12 09:18:09 +02:00
thrift-extensions Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
time-min-max Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
virtual-columns Prepare master branch for 31.0.0 release (#16333) 2024-04-26 09:22:43 +05:30
README.md

README.md

Community Extensions

Please contribute all community extensions in this directory and include a doc of how your extension can be used under docs/development/extensions-contrib/.

Please note that community extensions are maintained by their original contributors and are not packaged with the core Druid distribution. If you'd like to take on maintenance for a community extension, please post on dev@druid.apache.org to let us know!