-
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
Define and use a get_log_add_schema() function #407
Conversation
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.
just an overall question: do we want the static LOG_*SCHEMA
to be an Arc
? doesn't a static reference also implement the Send
/Sync
/etc. that we need? (and possibly marginally lighter weight?)
Rationale (from PR description):
Basically, it's easy/cheap to get a |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
==========================================
+ Coverage 78.80% 78.82% +0.02%
==========================================
Files 51 51
Lines 10647 10655 +8
Branches 10647 10655 +8
==========================================
+ Hits 8390 8399 +9
Misses 1788 1788
+ Partials 469 468 -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.
LGTM
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.
lgtm, thanks!
We have a convenient
get_log_schema()
function for accessing the Delta log schema, but many operations only need to access theadd
column. Replace clunky projection code with something direct and infallible, wrapped up asget_log_add_schema()
.While we're at it, make both functions return
SchemaRef
instead ofSchema
, to reduce the number of deep clones needed (many use sites anyway need an arc).