druid/web-console/src
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
..
ace-modes Web console: Better build experience (#8389) 2019-08-24 11:35:30 -07:00
blueprint-overrides Web console: refresh and tighten up the console styles 💅💫 (#10515) 2020-10-20 22:11:29 -07:00
bootstrap Web console: improve how code is imported, use API instance (#10597) 2020-12-01 13:16:14 -08:00
components Make web console fast around sys.segments (#10909) 2021-03-10 19:59:50 -08:00
dialogs Web console: remove namespace prop that does not exist from JDBC lookup (#10888) 2021-02-17 17:07:32 -08:00
druid-models DruidInputSource: Fix issues in column projection, timestamp handling. (#10267) 2021-03-25 10:32:21 -07:00
hooks Web console: improve query manager (convert to React hook) (#10360) 2020-09-11 19:42:50 -07:00
singletons Make web console fast around sys.segments (#10909) 2021-03-10 19:59:50 -08:00
utils DruidInputSource: Fix issues in column projection, timestamp handling. (#10267) 2021-03-25 10:32:21 -07:00
views DruidInputSource: Fix issues in column projection, timestamp handling. (#10267) 2021-03-25 10:32:21 -07:00
visualization Web console: replace (and remove) old consoles (#8838) 2019-11-15 19:45:14 -08:00
console-application.scss Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
console-application.tsx Web console: improve how code is imported, use API instance (#10597) 2020-12-01 13:16:14 -08:00
entry.scss Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
entry.ts remove extra word (#10682) 2020-12-15 23:02:33 -08:00
links.ts Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
setup-tests.ts Web console: improve how code is imported, use API instance (#10597) 2020-12-01 13:16:14 -08:00
variables.scss Web console: refresh and tighten up the console styles 💅💫 (#10515) 2020-10-20 22:11:29 -07:00