Commit Graph

535 Commits (f01382f578703c3203936e13014e1827607ca826)

Author SHA1 Message Date
Andrew Lamb 8c0ce0b2ce
docs: Add query README file and explain some rationale (#648)
* docs: Add query README file

* fix: Apply suggestions from code review

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
2021-01-12 18:26:32 -05:00
Andrew Lamb a5240af080
docs: Document desired crate dependencies in comments (#638)
* docs: Document the desire for read buffer and mutable buffer to be independent of query layer

* docs: Document desire for the query layer to not depend on storage systems

* fix: Apply suggestions from code review

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
2021-01-12 17:49:03 -05:00
Andrew Lamb 6376891da3
feat: implement query planning in terms of chunks (#647) 2021-01-12 16:04:45 -05:00
Andrew Lamb c1a7778d85
refactor: move id and deps out of query crate (#646) 2021-01-12 11:47:43 -05:00
Andrew Lamb fd28d8a01b
refactor: Use u32 for Chunk ids consistently (#639) 2021-01-11 16:07:22 -05:00
Andrew Lamb a4be6f74c7
refactor: Remove partition key from the Chunk trait (#622) 2021-01-08 06:11:07 -05:00
Andrew Lamb c672bb341d
feat: Extract SQL planning out of databases (#618) 2021-01-07 13:13:30 -05:00
Andrew Lamb 654b520005
feat: Interface for writing and querying mutable buffer, read buffer and parquet (#615)
* refactor: Create database with mutable buffer, read buffer and parquet files

* docs: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: rename planners to clarify what they are

* refactor: simplify traits

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-01-06 17:25:46 -05:00
Andrew Lamb 08d52ea043
feat: implement partition chunk rollover + ids and timestamps (#601)
* feat: implement partition chunk rollover + ids and timestamps

* feat: add last_write_timestamp

* refactor: Use DateTime<Utc> rather than Instant

* refactor: avoid use of structure to generate ids
2020-12-29 11:00:18 -05:00
Andrew Lamb 5fa77c32cc
feat: Add "Chunks" to the Mutable Buffer (#596)
* refactor: Update docs, remove unused field

* refactor: rename partition -> chunk

* feat: Introduce new partition, which is a holder for Chunks

* refactor: Remove use of wal from mutable database

* refactor: cleanups, remove last direct use of chunks

* fix: delete old benchmarks

* fix: clippy sacrifice

* docs: tidy up comments

* refactor: remove unused error types

* chore: remove commented out tests
2020-12-28 07:10:25 -05:00
Andrew Lamb 48c43b136c
refactor: rename write_buffer --> mutable_buffer (#595)
* refactor: git mv write_buffer mutable_buffer

* refactor: update crate name references

* refactor: update some more references
2020-12-22 10:49:53 -05:00
Andrew Lamb 263af1eeac
feat: implement read_group in the write_buffer (#583)
* feat: implement read_group in the write_buffer

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: rustfmt

* fix: adjust tests for min/max

* fix: Update write_buffer/src/table.rs

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-12-22 09:03:20 -05:00
Andrew Lamb 28eac06d8f
refactor: Organize window_bounds the same as selector functions (#594)
* refactor: Organize window_bounds the same as selector functions

* fix: add missing file
2020-12-21 12:51:36 -05:00
Andrew Lamb bb96142564
chore: Update arrow dependencies, remove custom min/max implementation (#585)
* chore: Update arrow dependency

* fix: Update code for changes in datafusion

* fix: use arrow version of min_boolean
2020-12-21 12:31:39 -05:00
Andrew Lamb 0de5a1e309
feat: Implement selector functions first, last, min, and max (#565)
* feat: Implement selector functions first, last, min, and max

* fix: update for changes in arrow

* docs: reference to min/max boolean array ticket

* docs: add reference to selector structs

* docs: Update query/src/func/selectors.rs
2020-12-17 17:51:36 -05:00
Andrew Lamb a6d2c13888
chore: Update arrow + other depenencies (#540)
* chore: Update arrow + other depenencies

* chore: Update write_buffer and query crate
2020-12-15 08:46:27 -05:00
Andrew Lamb 1740e26ec3
fix: do not produce gRPC series frames for fields that only contain null values (#558)
* test: add test for field columns with only nulls

* fix: do not produce series for null fields, tests for same

* fix: remove uneeded test printlns
2020-12-15 08:28:23 -05:00
Dom 4c35253fd5 style: unmangle wrapped diagrams
Adds #[rustfmt::skip] to comment blocks containing diagrams to skip wrapping.
2020-12-14 13:14:36 +00:00
Dom 6f473984d0 style: wrap comments
Runs rustfmt with the new config.
2020-12-11 18:22:26 +00:00
Andrew Lamb 50ba529cb8
test: Adds tests for read_group for None aggregates (#538) 2020-12-10 11:31:15 -05:00
Paul Dix fa3ecbd4ed
feat: Implement write buffer to Parquet snapshotting (#526)
* feat: Implement write buffer to Parquet snapshotting

This introduces snapshot to the server packages to manage snapshotting. It also introduces a new trait for representing a Partition. There is a very crude API wired up in http_routes for testing purposes. Follow on work will bring the server package into http_routes and rework the snapshot API.
2020-12-08 14:20:43 -05:00
Dom ceea61a211
Merge branch 'main' into dom/org-bucket-types 2020-12-04 11:33:36 +00:00
Andrew Lamb 4ec75a4f22
fix: Fix gRPC panic` when multiple field selections are provided (#523)
* fix: do not assert when multiple fields are selected

* fix: clippy

* fix: write unit test, fix bug

* fix: tweak comments
2020-12-03 12:31:02 -05:00
Dom f90a95fd80 fix: unambigious bucket/org to DB mappings
Previosuly the $ORG and $BUCKET was joined as:

	$ORG + "_" + $BUCKET

Which is fine unless either $ORG or $BUCKET includes a "_", such as:

	$ORG = "org_a"
	$BUCKET = "bucket"

	and

	$ORG = "org"
	$BUCKET = "a_bucket"

This change continues to join $ORG and $BUCKET with an underscore, but
disallows underscores in either $ORG or $BUCKET. It appears these values
are non-zero u64s in the gRPC protocol converted to their base-10 string
representations for the DB name, so this seems safe to enforce.

In addition, this change introduces a `DatabaseName` type to avoid
passing bare strings around, and allow consuming code to ensure only
valid database names are provided at compile type. This type works with
both owned & borrowed content so doesn't force a string copy where we
can avoid it, and derefs to `str` to make it easier to use with existing
code.

I've been minimally invasive in pushing the `DatabaseName` through the
existing code and figured I'd see what the sentement is first.
Candidates for conversion from `str` to `DatabaseName` that seem to make
sense to me include:

	- `DatabaseStore` trait
	- `RemoteServer` trait
	- Others? Basically anywhere other than the "edge" API inputs

Fixes #436 (thanks @zeebo)
2020-12-03 16:10:15 +00:00
Andrew Lamb ecc4eee8e1
refactor: Move SQL functions into is own trait (#511)
* refactor: remove uneeded function table_to_arrow from Trait

* refactor: Move SQL functions into is own trait
2020-12-02 08:23:37 -05:00
Andrew Lamb 5ef499bb63
refactor: rename Database --> TSDatabase to better reflect its purpose (#510)
* refactor: rename Database --> TSDatabase to better reflect its purpose

* refactor: rename field_columns to field_column_names

* fix: clippy?
2020-12-01 12:37:11 -05:00
Andrew Lamb 1646397891
refactor: consolidate GroupedSeriesSet and SeriesSet (#502) 2020-11-30 14:23:58 -05:00
Andrew Lamb 20f421e9c6
fix: Do not send GroupFrames in response to read_window_aggregate (#497)
* fix: Do not send GroupFrames in response to read_window_aggregate

* fix: clippy and test
2020-11-30 05:59:05 -05:00
Andrew Lamb 46d58dfec5
fix: allow empty `offset` widows for read_window_aggregate offset (#493)
* fix: allow empty `offset` widows for read_window_aggregate offset

* refactor: Use an enum for clarity
2020-11-27 09:31:22 -05:00
Andrew Lamb 129aa208ba
refactor: More use of datafusion expr building functions (#488) 2020-11-26 06:40:57 -05:00
Andrew Lamb 8908f43b43
refactor: clean up `use` statements (#487) 2020-11-25 16:14:29 -05:00
Andrew Lamb 3a9ee88f00
chore: update to latest version of arrow + update code (#486)
* chore: update to latest version of arrow + update code

* chore: Update rust toolchain to match arrow

* fix: clippy
2020-11-25 14:46:35 -05:00
Andrew Lamb 0eaa90e89d
feat: Hook up read_window_aggregate into the write_buffer, end-to-end tests (#483)
* feat: read_window_aggregate_plans

* fix: clippy sacrifice

* fix: clippy

* fix: clippy
2020-11-25 10:20:49 -05:00
Andrew Lamb 9f6427c94f
refactor: query/src/groupby.rs -> query/src/group_by.rs (#477)
* refactor: query/src/groupby.rs -> query/src/group_by.rs

* refactor: update references
2020-11-25 06:43:11 -05:00
Andrew Lamb cdb26e60e4
refactor: rename `storage` crate to `query` to better reflect what it is (#475)
* refactor: rename storage --> query

* refactor: update a few more referenes
2020-11-24 14:19:29 -05:00