Commit Graph

12607 Commits (614ff35998623026bd78b682dbce79827942e639)

Author SHA1 Message Date
Stuart Carnie 3fb867f1dc
feat: Display the query text when panicking.
Helpful for determining the cause of a failure.
2023-05-19 09:24:14 +10:00
Christopher M. Wolff 90a25a3ff0
chore: update DataFusion (#7825)
* chore: update DataFusion

* chore: Run cargo hakari tasks

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-05-18 17:51:16 +00:00
Andrew Lamb 6344fe8c3f
chore: Add rationale for `clippy::future_not_send` (#7822)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 16:58:56 +00:00
Andrew Lamb e97c48b388
feat: download catalog objects as part of `remote store get-table` (#7779)
* feat: download catalog objects as part of remote store get-table

* fix: fix future_not_send

* fix: reorder import order

* chore: reduce repetition of `Error` in naming

* fix: improve the partition filtering API

* fix: clarify export comment

* fix: make index printing consistent

* fix: improve skip message

* chore: add extra clippy lints to inmport_export crate

* fix: comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 16:52:43 +00:00
Fraser Savage c263585d94
feat(cli): Add table ID `debug wal regenerate-lp` command implementation
This adds a command to `influxdb_iox` that can take a WAL segment file
and regenerate all write operation entries, writing to stdout or namespaced
files within a target directory, using table ID as the measurement name
in the case where there is no catalog access at point of regeneration.
2023-05-18 17:20:41 +01:00
Fraser Savage fd5d5e0758
fix(wal): Assert WriteOpDecoder handles tail-corrupt WAL files correctly
WAL read errors encountered by the new WAL WriteOpDecoder were being
discarded and presented as a "happy path" end of file to callers due
to a bug in handling a nested result type. This moves the test for
decoding a tail-corrupt WAL into the crate itself and asserts the
error is reported correctly.
2023-05-18 17:18:19 +01:00
kodiakhq[bot] 607bc7243d
Merge pull request #7823 from influxdata/dom/replication-help
refactor(cli): update replication help text
2023-05-18 14:10:35 +00:00
Dom Dwyer 82500720e4
refactor(cli): update replication help text
The replication flag defines the total number of copies of each write -
slightly less confusing than the additional copies it was previously,
and matches with the actual code.
2023-05-18 16:01:12 +02:00
Andrew Lamb 042a6a66d5
refactor: remove old tsm import code (#7804)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 10:51:24 +00:00
dependabot[bot] b2c9592581
chore(deps): Bump bitflags from 1.3.2 to 2.3.1 (#7818)
* chore(deps): Bump bitflags from 1.3.2 to 2.3.1

Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: Run cargo hakari tasks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Dom <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 09:35:15 +00:00
dependabot[bot] 43a1f7c0b2
chore(deps): Bump rustls from 0.21.0 to 0.21.1 (#7819)
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.0 to 0.21.1.
- [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.0...v/0.21.1)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dom <dom@itsallbroken.com>
2023-05-18 09:29:26 +00:00
kodiakhq[bot] 97db01dbc6
Merge pull request #7817 from influxdata/cn/flaky-test
test: Add an invalid test configuration checker and fix potentially flaky test setups it detects
2023-05-18 09:04:42 +00:00
Stuart Carnie 04617a4362
Merge branch 'main' into sgc/issue/7794_subquery_inconsistency 2023-05-18 07:24:00 +10:00
Carol (Nichols || Goulding) 9cc2169ce2
fix: Rename Step::WaitForPersisted2 to Step::WaitForPersisted 2023-05-17 17:02:59 -04:00
Carol (Nichols || Goulding) 6785dcfd37
fix: Correct invalid test setups that the detector now detects 2023-05-17 17:00:17 -04:00
Carol (Nichols || Goulding) 45e47af974
test: Add an invalid test configuration checker
If the test setup calls `Step::Persist` to persist on-demand, that
means it shouldn't be used with `ChunkStage::Parquet`, which tries to
persist as fast as possible. This will fail the test with a hopefully
helpful message to prevent this.
2023-05-17 16:58:50 -04:00
Dom 3ec40ca5c7
Merge pull request #7800 from influxdata/dom/partition-template-rpc
feat(proto): partition template type
2023-05-17 15:35:40 +01:00
Dom 5fbf2d3d69
Merge branch 'main' into dom/partition-template-rpc 2023-05-17 15:06:17 +01:00
Marco Neumann 62fed73bcd
refactor: upgrade DataFusion to `19b03240920ad63cac916b42951754c0337bdac8#19b03240920ad63cac916b42951754c0337bdac8` (#7813)
I need:

- https://github.com/apache/arrow-datafusion/pull/6226.

Changes in code due to:

- https://github.com/apache/arrow-datafusion/pull/6332

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 13:57:12 +00:00
Andrew Lamb 1ff11d0856
refactor: Change catalog configuration so it is entirely dsn based / support end to end testing without postgres (#7736)
* refactor: Change catalog configuration so it is entirely dsn based / support end to end testing without postgres

Restores code from https://github.com/influxdata/influxdb_iox/pull/7708

Revert "revert: PR #7708"

This reverts commit c9cfe05f8d.

* fix: merge

* fix: Update new test
2023-05-17 13:36:25 +00:00
Dom Dwyer 63de1a3bc8
refactor(proto): use "tag" instead of "column"
I was going back and forth on this, but the MVP is tags only. If we
expand it to be the more general "columns" in the future, we can change
the proto to reflect the more generalised implementation and have a more
descriptive field name now!
2023-05-17 14:03:31 +02:00
kodiakhq[bot] 442cd1457a
Merge pull request #7811 from influxdata/savage/wal-inspect-without-table-name-index
feat(wal_inspect): Make table batch writing a trait, support table ID based line protocol
2023-05-17 10:45:19 +00:00
Fraser Savage 21d6460453
refactor(wal_inspect): Put the ref inside the option 2023-05-17 11:37:49 +01:00
Fraser Savage a56eb6efa6
refactor(wal_inspect): Take generic iterator rather than map as table_batch parameter
This allows for callers to use whatever collection implementation they
need, so we can ordered iterate in tests.
2023-05-17 11:31:05 +01:00
Fraser Savage d530b728d4
feat(wal_inspect): Make table_name_index optional for line proto writing
This will allow for decoding a WAL into line protocol without connecting
to a catalog service (or having an equivalent name lookup mechanism).
2023-05-17 10:48:14 +01:00
Fraser Savage e7a0ed4b24
refactor(wal_inspect): Make namespaced table batch writing a trait
This change allows callers to treat LineProtoWriter instances with
different write sink generators the same using generic parameters.
2023-05-17 10:48:13 +01:00
Marco Neumann 7e64264eef
refactor: remove `RedudantSort` optimizer pass (#7809)
* test: add dedup test for multiple partitions and ranges

* refactor: remove `RedudantSort` optimizer pass

Similar to #7807 this is now covered by DataFusion, as demonstrated by
the fact that all query tests (incl. explain tests) still pass.

The good thing is: passes that are no longer required don't require any
upstreaming, so this also closes #7411.
2023-05-17 09:30:04 +00:00
Stuart Carnie 39cffcbc92
chore: Add API to find all VarRef instances of a `SELECT` statement 2023-05-17 16:43:16 +10:00
Marco Neumann 931b4488bd
refactor: remove `SortPushdown` optimizer pass (#7807)
DataFusion is now smart enough to do that using the builtin passes. No
`EXPLAIN` tests regressed.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 06:26:31 +00:00
dependabot[bot] e51ca3bc2d
chore(deps): Bump reqwest from 0.11.17 to 0.11.18 (#7806)
* chore(deps): Bump reqwest from 0.11.17 to 0.11.18

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.17 to 0.11.18.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.17...v0.11.18)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: Run cargo hakari tasks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 06:15:24 +00:00
Nga Tran ca12f1c03d
fix: correctly recurse in `ParquetSortness` (#7778)
* test: reproducer for idpe_17556

* fix: `ParquetSortness` and partial opt

1. correctly handle cases where `ParquetSortness` would optimize one
   child branch but not the other
2. handle cases where `ParquetSortness` recusion should stop a bit
   clearer (using `TreeNodeRewriter`)
3. rename query tests to be a bit clearer
4. add test case with many (but not too many) duplicate files and an
   ingester (basically a prod use case where the compactor is slightly
   behind)

---------

Co-authored-by: Marco Neumann <marco@crepererum.net>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 06:09:23 +00:00
Marco Neumann d3ff945117
refactor: remove output sorting from scan provider (#7798)
This is somewhat a left-over from the old phys. plan construction where
we tried to fold in the sorts at the right place. Now the optimizer
takes care of that, so we can just express this as a standard logical
node (the same as SQL and InfluxQL). This makes the plan construction a
bit cleaner since the actual scan provider only performs the minimal
work that is required by DataFusion and the users (SQL, InfluxQL, reorg)
request what they actually need.

The tests in `iox_query::frontend::reorg::tests` that assert the tests
still pass and proof that the actual physical plans are identical w/
this approach.

Closes #7785.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 05:59:04 +00:00
Stuart Carnie b299937d18
chore: Resolve tags in GROUP BY clause
Any `VarRef`s in the `Select` where the `data_type` field is `None`
indicates there is no field or tag found in the schema of any children
in the `FROM` clause
2023-05-17 14:55:10 +10:00
Stuart Carnie 9cecb3504c
chore: Remove redundant call to `to_lowercase`
Function call names are normalised to lowercase by the parser.
2023-05-17 14:32:57 +10:00
Stuart Carnie c506ee5946
chore: Add test to validate `as_str` returns unquoted identifier 2023-05-17 14:31:01 +10:00
Stuart Carnie c9f8151302
feat: Resolve data types for `VarRef` nodes in the `WHERE` condition 2023-05-17 12:31:37 +10:00
Stuart Carnie 76aa1ac3d6
feat: Refactor node used to represent a tag in a `GROUP BY`
* Use `VarRef` for `Tag`, to ensure a consistent representation of a
  column reference across `GROUP BY`, `SELECT` projection and `WHERE`
  clause.
* Rename `tags` to `tag_names`
* `tags` now returns `VarRef`
2023-05-17 12:29:02 +10:00
Stuart Carnie 09835e5a98
feat: Implement Hash 2023-05-17 11:20:07 +10:00
Stuart Carnie 5c931fa92c
feat: Add explicit lifetimes 2023-05-17 11:17:57 +10:00
kodiakhq[bot] 95d9553afd
Merge pull request #7773 from influxdata/sgc/issue/6879_subquery_01
feat: Initial support for subqueries
2023-05-16 23:32:27 +00:00
Stuart Carnie 90328e5d0f
chore: PR feedback 2023-05-17 09:24:55 +10:00
Stuart Carnie d7ab96c879
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-17 07:20:08 +10:00
wiedld a4ad4fe69e
fix(4895): handle measurement missing, null bytes, and `=` in measurement names (#7759)
* test: add tests for the desired contract for parsing measurements from line protocol
* fix: restrict null chars in measurement
* chore: make an explicit Measurement type
* refactor: have iox lp parser match influxdb contract, for acceptance of eq in measurements
* test: create end_to_end test to confirm same write-then-read behavior with `=` in measurements, is the same as influxdb
2023-05-16 10:48:39 -07:00
wiedld 007460c0a6
Merge pull request #7690 from influxdata/chore/router-metrics-for-auth-v2
chore: authz metric to measure duration of ioxauth rpc call
2023-05-16 10:40:39 -07:00
wiedld 506bd80f6f
Merge branch 'main' into chore/router-metrics-for-auth-v2 2023-05-16 10:24:42 -07:00
Andrew Lamb c077dec0e0
refactor: rename `import` to `iox_import_export` (#7799)
* refactor: rename `import` crate to `import_export`

* chore: Consolidate tsm import/export

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-16 17:10:17 +00:00
Martin Hilton c9cd1fdc44
chore: add a go_package option to the authz proto file (#7802)
This is to fix a downstream service that builds a go package from
these definitions.
2023-05-16 16:51:51 +00:00
kodiakhq[bot] 8fa7e7cbef
Merge pull request #7801 from influxdata/dom/fix-minutes
fix: correct time range buckets
2023-05-16 16:05:36 +00:00
Dom Dwyer 0a31afd00d
fix: correct time range buckets
Turns out there are 60 seconds in a minute, not 3,600.
2023-05-16 17:47:34 +02:00
Dom Dwyer bc33ad1548
feat: PartitionTemplate proto definition
Defines the PartitionTemplate as a re-usable proto type.
2023-05-16 16:54:36 +02:00