druid/web-console/src/utils
Gian Merlino bf20f9e979
DruidInputSource: Fix issues in column projection, timestamp handling. (#10267)
* DruidInputSource: Fix issues in column projection, timestamp handling.

DruidInputSource, DruidSegmentReader changes:

1) Remove "dimensions" and "metrics". They are not necessary, because we
   can compute which columns we need to read based on what is going to
   be used by the timestamp, transform, dimensions, and metrics.
2) Start using ColumnsFilter (see below) to decide which columns we need
   to read.
3) Actually respect the "timestampSpec". Previously, it was ignored, and
   the timestamp of the returned InputRows was set to the `__time` column
   of the input datasource.

(1) and (2) together fix a bug in which the DruidInputSource would not
properly read columns that are used as inputs to a transformSpec.

(3) fixes a bug where the timestampSpec would be ignored if you attempted
to set the column to something other than `__time`.

(1) and (3) are breaking changes.

Web console changes:

1) Remove "Dimensions" and "Metrics" from the Druid input source.
2) Set timestampSpec to `{"column": "__time", "format": "millis"}` for
   compatibility with the new behavior.

Other changes:

1) Add ColumnsFilter, a new class that allows input readers to determine
   which columns they need to read. Currently, it's only used by the
   DruidInputSource, but it could be used by other columnar input sources
   in the future.
2) Add a ColumnsFilter to InputRowSchema.
3) Remove the metric names from InputRowSchema (they were unused).
4) Add InputRowSchemas.fromDataSchema method that computes the proper
   ColumnsFilter for given timestamp, dimensions, transform, and metrics.
5) Add "getRequiredColumns" method to TransformSpec to support the above.

* Various fixups.

* Uncomment incorrectly commented lines.

* Move TransformSpecTest to the proper module.

* Add druid.indexer.task.ignoreTimestampSpecForDruidInputSource setting.

* Fix.

* Fix build.

* Checkstyle.

* Misc fixes.

* Fix test.

* Move config.

* Fix imports.

* Fixup.

* Fix ShuffleResourceTest.

* Add import.

* Smarter exclusions.

* Fixes based on tests.

Also, add TIME_COLUMN constant in the web console.

* Adjustments for tests.

* Reorder test data.

* Update docs.

* Update docs to say Druid 0.22.0 instead of 0.21.0.

* Fix test.

* Fix ITAutoCompactionTest.

* Changes from review & from merging.
2021-03-25 10:32:21 -07:00
..
basic-action.tsx Web console: better action linking between views (#8203) 2019-07-31 07:13:25 -07:00
capabilities.ts Make web console fast around sys.segments (#10909) 2021-03-10 19:59:50 -08:00
column-metadata.ts Web console: added Query View metadata pane, more query details (#7905) 2019-06-17 13:14:42 -07:00
druid-expression.ts Web console: prettier code (#7939) 2019-06-21 16:52:33 -07:00
druid-lookup.ts Web console: improve query manager (convert to React hook) (#10360) 2020-09-11 19:42:50 -07:00
druid-query.spec.ts Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
druid-query.ts Web console: improve how code is imported, use API instance (#10597) 2020-12-01 13:16:14 -08:00
general.spec.ts Web console: fix data loader schema table column ordering bug and other polish (#10588) 2020-11-17 13:25:03 -08:00
general.tsx Make web console fast around sys.segments (#10909) 2021-03-10 19:59:50 -08:00
index.tsx Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
joda-to-regexp.spec.ts Web console: refactor home view, add tests (#8247) 2019-08-06 12:41:07 -07:00
joda-to-regexp.ts Web console: prettier code (#7939) 2019-06-21 16:52:33 -07:00
load-rule.ts Remove colocated datasources from web console for broadcast indexed tables (#10018) 2020-06-11 14:08:03 -10:00
local-storage-backed-array.tsx fix web-console show json bug (#10710) 2021-01-08 14:55:55 -08:00
local-storage-keys.tsx Make web console fast around sys.segments (#10909) 2021-03-10 19:59:50 -08:00
object-change.spec.ts fix web-console show json bug (#10710) 2021-01-08 14:55:55 -08:00
object-change.ts Web console: reflect the changes to interval requirement in the data loader flow (#10647) 2020-12-09 10:18:42 -08:00
query-context.tsx Web console: Save query context also (#8395) 2019-08-25 16:56:27 -07:00
query-cursor.ts Web console: improve query manager (convert to React hook) (#10360) 2020-09-11 19:42:50 -07:00
query-history.ts fix web-console show json bug (#10710) 2021-01-08 14:55:55 -08:00
query-manager.tsx Web console: fix data loader schema table column ordering bug and other polish (#10588) 2020-11-17 13:25:03 -08:00
query-state.ts Web console: fix data loader schema table column ordering bug and other polish (#10588) 2020-11-17 13:25:03 -08:00
render-spy.ts Web console: Memoize all the functional components and improve transform step highlighting (#8757) 2019-10-26 17:58:26 -07:00
sampler.ts DruidInputSource: Fix issues in column projection, timestamp handling. (#10267) 2021-03-25 10:32:21 -07:00
utils.spec.ts Web console: reflect the changes to interval requirement in the data loader flow (#10647) 2020-12-09 10:18:42 -08:00