Skip to content

fix(query): apply time bounds to staging scans, drop legacy ingestor fetch - #1887

Open
parmesant wants to merge 2 commits into
parseablehq:mainfrom
parmesant:query-updates
Open

parmesant wants to merge 2 commits into
parseablehq:mainfrom
parmesant:query-updates

Conversation

@parmesant

Copy link
Copy Markdown
Contributor
  • Staging is read only in Mode::All, and the in-memory buffer is kept only in that mode.
  • staging_mem_scan applies Exact filters itself. MemTable ignores scan filters and Exact bounds are not re-applied above the scan, so every buffered row was returned before.
  • staging_filters pushes a minute-aligned end bound near now (current or previous minute) to the next minute. The query end is truncated to the minute, so rows from the current minute were dropped. This applies to the staging mem and parquet scans only.
  • extract_timestamp_bound returns None on an out-of-range millisecond literal instead of panicking.
  • Remove the legacy Flight ingestor fetch (send_to_ingester, run_do_get_rpc, append_temporary_events) and the staging clear in do_get.

Fixes #XXXX.

Description


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

…fetch

- Staging is read only in Mode::All, and the in-memory buffer is kept only
  in that mode.
- staging_mem_scan applies Exact filters itself. MemTable ignores scan
  filters and Exact bounds are not re-applied above the scan, so every
  buffered row was returned before.
- staging_filters pushes a minute-aligned end bound near now (current or
  previous minute) to the next minute. The query end is truncated to the
  minute, so rows from the current minute were dropped. This applies to the
  staging mem and parquet scans only.
- extract_timestamp_bound returns None on an out-of-range millisecond
  literal instead of panicking.
- Remove the legacy Flight ingestor fetch (send_to_ingester,
  run_do_get_rpc, append_temporary_events) and the staging clear in do_get.
- Add staging_arrow_exec to stream_schema_provider. It scans .arrows and
  in-progress .arrows.part files with one partition per file. Each batch is
  adapted to the table schema and batches that don't fit are skipped. A
  torn tail ends the read and a missing file yields nothing. The predicate
  is applied before projection.
- Standalone (Mode::All) staging queries read arrow files through
  staging_arrow_exec, using the rounded staging_filters predicate.
- Remove the in-memory staging writer: MemWriter, MutableBuffer,
  ENABLE_MEMORY_STAGING, Stream::recordbatches_cloned and Stream::clear.
  Writer now holds only the disk writers.
- Remove staging_mem_scan and reversed_mem_table.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant