druid/extensions-contrib
Gian Merlino 6aca61763e
SQL: Use timestamp_floor when granularity is not safe. (#13206)
* SQL: Use timestamp_floor when granularity is not safe.

PR #12944 added a check at the execution layer to avoid materializing
excessive amounts of time-granular buckets. This patch modifies the SQL
planner to avoid generating queries that would throw such errors, by
switching certain plans to use the timestamp_floor function instead of
granularities. This applies both to the Timeseries query type, and the
GroupBy timestampResultFieldGranularity feature.

The patch also goes one step further: we switch to timestamp_floor
not just in the ETERNITY + non-ALL case, but also if the estimated
number of time-granular buckets exceeds 100,000.

Finally, the patch modifies the timestampResultFieldGranularity
field to consistently be a String rather than a Granularity. This
ensures that it can be round-trip serialized and deserialized, which is
useful when trying to execute the results of "EXPLAIN PLAN FOR" with
GroupBy queries that use the timestampResultFieldGranularity feature.

* Fix test, address PR comments.

* Fix ControllerImpl.

* Fix test.

* Fix unused import.
2022-10-17 08:22:45 -07:00
..
aliyun-oss-extensions Lazy initialization of segment killers, movers and archivers (#13170) 2022-10-04 15:55:46 +05:30
ambari-metrics-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
cassandra-storage Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
cloudfiles-extensions Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
compressed-bigdecimal CompressedBigDecimal Min/Max (#13141) 2022-10-11 16:35:21 -07:00
distinctcount Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
dropwizard-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
gce-extensions Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
graphite-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
influx-extensions Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
influxdb-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
kafka-emitter Fix compiler error: The project was not built since its build path is incomplete. Cannot find the class file for org.slf4j.Logger. Fix the build path then try building this project (#13029) 2022-09-06 20:49:41 +05:30
materialized-view-maintenance Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
materialized-view-selection Redesign QueryContext class (#13071) 2022-10-15 11:02:11 +05:30
momentsketch Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
moving-average-query Redesign QueryContext class (#13071) 2022-10-15 11:02:11 +05:30
opentelemetry-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
opentsdb-emitter Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
prometheus-emitter prometheus-emitter supports sending metrics to pushgateway regularly … (#13034) 2022-09-09 20:46:14 +08:00
redis-cache Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
sqlserver-metadata-storage Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
statsd-emitter Improve global-cached-lookups metric reporting (#13219) 2022-10-13 18:51:54 -04:00
tdigestsketch Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
thrift-extensions Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
time-min-max Bump up the version to 25.0.0 (#12975) 2022-08-29 11:27:38 +05:30
virtual-columns SQL: Use timestamp_floor when granularity is not safe. (#13206) 2022-10-17 08:22:45 -07:00
README.md fix broken links (#9537) 2020-03-22 17:41:18 -07:00

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!