dependabot[bot]
7c771ce6f3
chore(deps): Bump serde_json from 1.0.99 to 1.0.100 ( #8147 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.99...v1.0.100 )
---
updated-dependencies:
- dependency-name: serde_json
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>
2023-07-05 09:12:11 +00:00
Stuart Carnie
2a5a13f840
Merge branch 'main' into sgc/issue/test_conflict
2023-07-05 09:10:47 +10:00
Martin Hilton
511a0bae78
feat(influxql): add derivative and non_negative_derivative ( #8103 )
...
Add the DERIVATIVE and NON_NEGATIVE_DERIVATIVE functions to influxql.
These are used to calculate derivatives over arbitrary time units.
The implementation is modeled after the DIFFERENCE and
NON_NEGATIVE_DIFFERENCE functions, with a difference that the unit
parameters is a configuration of the user-defined aggregator function
and therefore there cannot be a single shared definition of the
function.
The NON_NEGATIVE_DIFFERENCE function implementation has been
refactored to be an arbitrary NON_NEGATIVE wrapper for any Accumulator
function.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-29 05:53:18 +00:00
dependabot[bot]
24ca0fef30
chore(deps): Bump serde_json from 1.0.97 to 1.0.99 ( #8076 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.97 to 1.0.99.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.97...v1.0.99 )
---
updated-dependencies:
- dependency-name: serde_json
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>
2023-06-26 09:25:38 +00:00
dependabot[bot]
74a48a8f63
chore(deps): Bump itertools from 0.10.5 to 0.11.0 ( #8060 )
...
* chore(deps): Bump itertools from 0.10.5 to 0.11.0
Bumps [itertools](https://github.com/rust-itertools/itertools ) from 0.10.5 to 0.11.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0 )
---
updated-dependencies:
- dependency-name: itertools
dependency-type: direct:production
update-type: version-update:semver-minor
...
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-06-23 08:11:56 +00:00
Marco Neumann
178483c1a0
feat: basic non-aggregates w/ InfluxQL selector functions ( #8016 )
...
* test: ensure that selectors check arg count
* feat: basic non-aggregates w/ InfluxQL selector functions
See #7533 .
* refactor: clean up code
* feat: get more advanced cases to work
* docs: remove stale comments
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-23 08:05:50 +00:00
Stuart Carnie
abcff86954
chore: add test to demonstrate aliasing rules for conflict
...
See: https://github.com/influxdata/influxdb_iox/pull/8016#discussion_r1235198831
2023-06-23 10:41:59 +10:00
Stuart Carnie
3f93d4c123
chore: Update comment to refer to issue
2023-06-22 13:05:40 +10:00
Stuart Carnie
631d430e2f
chore: Cleanup 🧹
2023-06-22 12:10:14 +10:00
Stuart Carnie
c804065f9c
chore: PR feedback
...
Added docs as to why these functions are unimplemented
See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237284428
2023-06-22 12:07:25 +10:00
Stuart Carnie
1aa751f687
chore: PR feedback
...
Refactored logic to be clearer
See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237281212
2023-06-22 11:59:25 +10:00
Stuart Carnie
d62549112c
chore: PR feedback
...
I've removed the check, as both the planner and rewriter guarantee
the invariant that the second argument is a numeric constant.
See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237279802
2023-06-22 11:58:26 +10:00
Stuart Carnie
5934c7dd69
chore: use function name
...
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-06-22 10:35:10 +10:00
Stuart Carnie
fa428560b4
chore: little cleanup to reuse the `NUMERICS` list
2023-06-21 16:28:45 +10:00
Stuart Carnie
2cbaf9cffa
chore: more tests, renamed avg_n → moving_average
2023-06-21 15:05:08 +10:00
Stuart Carnie
edaac28498
Merge branch 'main' into sgc/issue/7600_moving_average
2023-06-21 11:39:06 +10:00
dependabot[bot]
123ba32fb9
chore(deps): Bump serde_json from 1.0.96 to 1.0.97 ( #8021 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.96 to 1.0.97.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.96...v1.0.97 )
---
updated-dependencies:
- dependency-name: serde_json
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>
2023-06-20 08:53:15 +00:00
Stuart Carnie
3167a38c9f
chore: add missing attribute
2023-06-20 17:01:32 +10:00
Stuart Carnie
a2521bbf35
feat: moving_average, difference and non_negative_difference
...
There is a `todo` regarding `update_batch` to be discussed with @alamb
2023-06-20 16:37:28 +10:00
Stuart Carnie
b8a2cf8098
chore: Just return `SelectStatementInfo`
2023-06-20 12:22:24 +10:00
Stuart Carnie
8670b28445
Merge branch 'main' into sgc/issue/7600_moving_average
2023-06-18 09:41:19 +10:00
Andrew Lamb
5889c96501
chore: Update `datafusion` and other dependencies ( #7981 )
...
* chore: Update DatFaFusion pin
* chore: Update other dependencies
* chore: Update hakari
* fix: Update for API changes
* fix: Update explain plan
* fix: Update influxql plans
* fix: rustdoc links
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-16 09:48:55 +00:00
Stuart Carnie
2407be8062
feat: trialed retractable UDAF
...
Unfortunately, this is not suitable when the source data has nulls,
as InfluxQL OG ignores these values.
2023-06-16 13:10:47 +10:00
Stuart Carnie
22baf5096e
feat: define place-holder UDFs for `moving_average` and `difference`
2023-06-16 13:10:47 +10:00
Stuart Carnie
bd4e7e563f
chore: rustfmt 🧹
2023-06-15 12:42:32 +10:00
Stuart Carnie
5c9e8dba5b
chore: Fix tests and clippy warnings
2023-06-15 12:32:45 +10:00
Stuart Carnie
e55f45fee2
chore: expand time range using `extra_intervals` and capture ordering
2023-06-15 12:23:23 +10:00
Stuart Carnie
3dd6c9a6e2
feat: distinguish window from aggregate functions
2023-06-15 12:19:37 +10:00
Stuart Carnie
32b668c848
chore: match InfluxQL OG behaviour for time ranges
2023-06-15 12:15:57 +10:00
Stuart Carnie
7bd2a7bfdb
chore: Extract interval duration and offset from `TIME`
2023-06-15 12:15:56 +10:00
Stuart Carnie
f114842711
feat: Push outer query time-range to subqueries
...
Added additional end-to-end tests to validate time-range behaviour
2023-06-06 16:33:01 +10:00
Stuart Carnie
8c71f30145
chore: Don't wrap `TimeRange` in an `Option`
...
It is unnecessary, because both the lower and upper are already
optional values.
2023-06-06 15:07:47 +10:00
Stuart Carnie
9e2550c933
Merge branch 'main' into sgc/issue/7829_time_bounds_3
...
# Conflicts:
# iox_query_influxql/src/plan/planner.rs
2023-06-06 12:55:43 +10:00
Stuart Carnie
01a22f8a2c
chore: Simplify WHERE clause handling
...
We don't need `Context` in the expression rewriting, which eliminates
a redundant `Context::default()` call in all the `SHOW` (metadata)
queries. Also simplified the time-range handling of metadata queries,
as we now have API to extract the time range from a `WHERE` clause
predicate and add the time filter to the same `Filter` logical plan
node.
2023-06-06 12:54:05 +10:00
Andrew Lamb
f571aeb445
chore: Update DataFusion pin ( #7916 )
...
* chore: Update DataFusion pin
* chore: Update cargo
* fix: update for API changes
* fix: Update plans
* chore: Update for new api
* fix: Update plans
* chore: Update for API changes more
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-05 18:38:59 +00:00
Stuart Carnie
d8c2f2c679
refactor: Simplify `TimeRange` to match InfluxQL OG behaviour explicitly
2023-06-05 15:14:13 +10:00
Stuart Carnie
8c51d855e4
chore: `super` is shorter
2023-06-02 13:56:58 +10:00
Stuart Carnie
61e19c9036
refactor: Use InfluxQL implementation for simplifying time ranges
2023-06-02 13:40:02 +10:00
Stuart Carnie
d5719f9be2
refactor: Moved simplification of time range expressions to parser
2023-06-02 09:50:01 +10:00
Stuart Carnie
8c02f81456
chore: Add some docs to the execution_props API
2023-05-31 12:31:38 +10:00
Stuart Carnie
d9d7419693
refactor: move time range logic to separate module
...
The `rewrite_expression` module was getting large, so made sense to
move time range logic to its own module.
2023-05-31 12:28:03 +10:00
Stuart Carnie
0a7e162911
refactor: rename into planner submodule
2023-05-31 12:14:12 +10:00
Stuart Carnie
8f2c235b15
refactor: these are APIs for transforming InfluxQL expressions
2023-05-31 12:09:32 +10:00
Stuart Carnie
600ed6652c
refactor: rewrite time-range expressions to a single range
...
Fixes gap filling, which was confused by multiple lower or upper
time bounds.
2023-05-30 15:46:45 +10:00
Christopher M. Wolff
2a07b53879
feat: add more tag predicate rewrite logic for InfluxQL ( #7869 )
...
* feat: add more tag predicate rewrite logic for InfluxQL
* chore: cargo fmt
* chore: fmt
* test: add more tests
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-26 21:53:52 +00:00
Stuart Carnie
6c8cab1073
chore: Separate scope from context, as it is a separate concern
2023-05-26 12:12:11 +10:00
Stuart Carnie
377e108152
chore: No need to be exported from current module
2023-05-26 12:12:10 +10:00
Dom Dwyer
928a4d163e
build: remove unused dependencies from crates
...
This commit fixes loads of crates (47!) had unused dependencies, or
mis-configured dependencies (test deps as normal deps).
I added the "unused_crate_dependencies" to all crates to help prevent
this mess from growing again!
https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.UNUSED_CRATE_DEPENDENCIES.html
This has the minor downside of false-positives when specifying
dev-dependencies for test/bench binaries - these are files in /test or
/benches (not normal tests). This commit includes a workaround,
importing them in lib.rs (gated by a feature flag). I think the
trade-off of better dependency management is worth it!
2023-05-23 14:55:43 +02:00
Stuart Carnie
46031b2031
chore: rustfmt 🧹
2023-05-23 10:10:41 +10:00
Stuart Carnie
66623398a8
chore: add some additional tests to validate multiple data sources
2023-05-23 09:52:01 +10:00