Skip to content

Conversation

@nicklan
Copy link
Collaborator

@nicklan nicklan commented May 3, 2024

  • redo inspect-table with new model

@roeap roeap mentioned this pull request May 8, 2024
@codecov
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.68%. Comparing base (f485466) to head (e69bf1e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
+ Coverage   77.66%   77.68%   +0.02%     
==========================================
  Files          49       49              
  Lines       10079    10089      +10     
  Branches    10079    10089      +10     
==========================================
+ Hits         7828     7838      +10     
  Misses       1805     1805              
  Partials      446      446              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nicklan nicklan marked this pull request as ready for review October 3, 2024 16:57
Copy link
Member

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm only thing that feels worth double-checking is the pub actions/visitors for developer-visibility? seems fine since we basically say everything is 'unstable' in those APIs anyways and we could revoke it in the future (just saying it's a two-way door). also I think for write path I'll need to expand this to include commitInfo action when that goes in. lastly, for my future self: nothing here is a breaking change- correct?

"cloud",
"default-engine",
"developer-visibility",
"tokio",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is tokio a feature? doesn't default-engine feature turn on tokio?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I think you're right

@nicklan
Copy link
Collaborator Author

nicklan commented Oct 9, 2024

is the pub actions/visitors for developer-visibility? seems fine since we basically say everything is 'unstable' in those APIs anyways and we could revoke it in the future (just saying it's a two-way door).

Yeah, I think it's fine to put stuff behind developer-visibility and then change it, we're not promising those will stay the same

also I think for write path I'll need to expand this to include commitInfo action when that goes in.

Yep, sounds correct

lastly, for my future self: nothing here is a breaking change- correct?

Nope, should not be


fn fields_in(field: &StructField) -> usize {
if let DataType::Struct(ref inner) = field.data_type {
let mut count = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Not sure if we have a preference for FP vs imperative, but we could do this

        inner.fields().map(fields_in).sum()

impl DataVisitor for LogVisitor {
fn visit<'a>(&mut self, row_count: usize, getters: &[&'a dyn GetData<'a>]) -> DeltaResult<()> {
for i in 0..row_count {
if let Some(path) = getters[self.add_offset].get_opt(i, "add.path")? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the DataVisitor::visit has a TODO for a better doc comment. This may be a good opportunity to add that. In particular, I want to know what getters are supposed to look like. Even a pointer to docs for EngineData::extract would be handy. I'm also interested in how TypedGetData::get/TypedGetData::get_opt work wrt the field name. Do we always have to start at the top level field (ie add.path), or could we have done path here since getters only stores leaves.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, added a better comment there.

Note that this is an internal trait that connector/engine authors don't need to worry about.

Re add.path vs. path, that's actually only for debugging purposes. The getters already are only for leaf nodes in the schema passed to extract. So we'll just return an Err with add.path in the message if we didn't find a String in the getter. It helps a lot when you're working on any code that touches this stuff.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, so just a label for debuggability, makes sense

@OussamaSaoudi-db

This comment was marked as outdated.

Copy link
Collaborator

@OussamaSaoudi-db OussamaSaoudi-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ! This looks like it'll be a rly handy tool

@nicklan nicklan merged commit 463bc7e into delta-io:main Oct 9, 2024
14 checks passed
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.

3 participants