-
Notifications
You must be signed in to change notification settings - Fork 58
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): expose metadata in SchemaEngineVisitor ffi api #659
base: main
Are you sure you want to change the base?
feat!(ffi): expose metadata in SchemaEngineVisitor ffi api #659
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
==========================================
- Coverage 83.92% 83.82% -0.10%
==========================================
Files 75 75
Lines 17277 17297 +20
Branches 17277 17297 +20
==========================================
Hits 14500 14500
- Misses 2078 2098 +20
Partials 699 699 ☔ 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.
looking good, left a couple comments!
also looks like builds are red due to unused arg:
|
Oh I think due to the preprocessing? might need to IFDEF in such at way that it doesn't yell about unused vars.. |
fixed in the last commit |
void print_physical_name(const char *name, const CStringMap* metadata) | ||
{ | ||
#ifdef VERBOSE | ||
char* key_str = "delta.columnMapping.physicalName"; |
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.
NOTE: This is an internal Delta column that should not actually be user-visible, see #583. That needs to be fixed in kernel proper (not here in the FFI layer), but when it does get fixed this example will stop working.
) -> usize { | ||
let child_list_id = (visitor.make_field_list)(visitor.data, 1); | ||
visit_schema_item( | ||
"array_element", | ||
&at.element_type, | ||
contains_null, | ||
metadata, |
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.
This looks wrong. We're passing field metadata for the array itself to the visitor for its element type -- even tho the call
macro already passed it to the visit_array
callback. I'm pretty sure we need to pass an empty map here, because these internal fields don't have metadata associated with them
(same for map key/value visitors below)
What changes are proposed in this pull request?
This PR affects the following public APIs
A new argument "metadata" was added to EngineSchemaVisitor visitor functions.
How was this change tested?
examples/read_table
was updated to test the change.