Asserts write buffer seeking behaviour, including:
* Seeking past already persisted data correctly
* Skipping to next available op in non-contiguous offset stream
* Skipping to next available op for dropped ops due to retention
* Panics when seeking beyond available data (into the future)
Removes a pair of tests that covered some of the above due to their
tight coupling with ingester internals.
This commit adds a new test that exercises all major external APIs of
the ingester:
* Writing data via the write buffer
* Waiting for data to be readable via the progress API
* Querying data and and asserting the contents
This should provide basic integration coverage for the Ingester
internals. This commit also removes a similar test (though with less
coverage) that was tightly coupled to the existing buffering structures.
Adds a test helper type that maintains the in-memory state for a single
ingester integration test, and provides easy-to-use methods to
manipulate and inspect the ingester instance.
An existing function to map the complex IngesterQueryResponse type to a
simple set of RecordBatch existed in test code - this has been lifted
onto an inherent method on the response type itself for reuse.
* test: Failing tests for unsupported queries
* fix: Catch unsupported SQL operations and error rather than return nothing
* test: Document a few more error messages that come through DataFusion
* refactor: Extract a Step to make query error tests nicer to read and write
* fix: update tests for new error codes
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* refactor: Extract do_get implementation into its own function
* feat: add more logging to SQL execution
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: query only from parquet
* Revert "feat: query only from parquet"
This reverts commit 5ce3c3449c0b9c90154c8c6ece4a40a9c083b7ba.
* Revert "revert: disable read buffer usage in querier (#5579) (#5603)"
This reverts commit df5ef875b4.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: Reimplement keywords as BTreeSet for more efficient lookup
Added a `Token` type to perform case-insensitive comparisons to avoid
allocations when performing lookups in the set.
Also introduced new `keyword` combinator to replace use of
`tag_no_case`. This is necessary to prevent eagerly recognising tags
without the appropriate separator. For example, `tag_no_case("OR")`
will recognise `ORDER` in a conditional expression.
The new combinator a `keyword` follows the pattern:
```
keyword ::= (a..z | A..Z)* keyword_separator
keyword_separator ::= ' ' | '(' | ')' | ';' | ',' | '=' |
'\n' | '\t'
```
* fix: Allow quoted time; using more efficient case-insensitive comparison
* fix: Digits to right of decimal point are optional
* fix: More idiomatic use of zip
* fix: Use `keyword` combinator and adjust whitespace handling
* fix: <> is a valid alias for the != operator
* fix: Special handling of DISTINCT identifier for function call name
* chore: Add tests
* chore: Feedback to remove unnecessary comments
* chore: Switch from BTreeSet to HashSet – thanks @domodwyer!
* fix: only emit ttbr metric for applied ops
* fix: move DmlApplyAction to s/w accessible
* chore: test for skipped ingest; comments and log improvements
* fix: fixed ingester test re skipping write
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix: Avoid some allocations by collecting instead of inserting into a vec
* refactor: Encode that adding columns is for one table at a time
* test: Add another test of column limits
* test: Add below/above limit tests for create_or_get_many
* fix: Explicitly DO NOT check column limits when inserting many columns
* feat: Cache the max_columns_per_table on the NamespaceSchema
* feat: Add a function to validate column limits in-memory
* fix: Provide more useful information when over column limits
* fix: Swap types to remove intermediate allocation
* docs: Explain the interactions of the cache and the column limits
* test: Actually set up test that showcases column limit race condition
* fix: Allow writing to existing columns even if table is over column limit
Co-authored-by: Dom <dom@itsallbroken.com>
* feat: Partition implementation of Visitable for InfluxQL AST
* feat: Added consistent structures for each clause to simplify visitor
Continued to expand `accept` and `pre` / `post` visit implementations.
* feat: Added insta and tests using snapshots (thanks @crepererum)
The insta crate simplifies the process of validating the combination of
visitor and accept implementations are called and in the correct order.
* chore: Run cargo hakari tasks
* feat: Added remaining snapshot tests
Some tests are failing as some minor type changes must be added along
with the addition of related visitor functions.
* feat: Add types to represent each clause in numerous statements
These clauses permit distinct visit functions on the `Visitor` type.
* chore: Reformat `SELECT`
* chore: Explicitly specify access to export selected types only
This required completing all the missing documentation for the exported
types.
* chore: Update Cargo.lock
* chore: macro to implement common traits and hide 0th tuple element
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>