-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!(ffi): new visit_schema FFI and rename old visit_schema to visit_snapshot_schema #683
feat!(ffi): new visit_schema FFI and rename old visit_schema to visit_snapshot_schema #683
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #683 +/- ##
==========================================
- Coverage 84.27% 84.22% -0.06%
==========================================
Files 77 77
Lines 17950 17960 +10
Branches 17950 17960 +10
==========================================
- Hits 15127 15126 -1
- Misses 2107 2119 +12
+ Partials 716 715 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good cleanup. For some reason I thought we'd already made this change, but clearly not!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need to update the ffi tests that call to this. Everything besides that is looking good. Ping me when the ffi stuff is ready :)
## What changes are proposed in this pull request? This PR removes the old `visit_snapshot_schema` introduced in #683 - we should just go ahead and do the 'right thing' with having a `visit_schema` (introduced in the other PR) and a `logical_schema()` function (added here) in order to facilitate visiting the snapshot schema. Additionally I've moved the schema-related things up from `scan` module to top-level in ffi crate. Exact changes listed below; this PR updates tests/examples to leverage the new changes. ### This PR affects the following public APIs 1. Remove `visit_snapshot_schema()` API 2. Add a new `logical_schema(snapshot)` API so you can get the schema of a snapshot and use the `visit_schema` directly 3. Renames `free_global_read_schema` to just `free_schema` 4. Moves `SharedSchema` and `free_schema` up from `mod scan` into top-level `ffi` crate. ## How was this change tested? existing UT
What changes are proposed in this pull request?
When given a schema (e.g. in
global_scan_state
) the engine needs a way to visit this schema. This introduces a new APIvisit_schema
to allow engines to visit any schema over FFI. An API calledvisit_schema
previously existed but visited the schema of a given snapshot; this has now been renamed tovisit_snapshot_schema
.This PR affects the following public APIs
Renamed
visit_schema
tovisit_snapshot_schema
and nowvisit_schema
takesSharedSchema
as an argument instead of a snapshot.How was this change tested?
updated read_table test