-
Notifications
You must be signed in to change notification settings - Fork 251
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
Recursively set dictionaries in struct fields #662
Conversation
@@ -301,7 +303,7 @@ impl Field { | |||
assert!(self.data_type().is_dictionary()); | |||
self.dictionary = Some(Dictionary { | |||
offset: 0, |
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.
Should set the offset as well?
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.
Added a comment clarifying when / how these fields are set
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.
Thank you!
rust/src/datatypes.rs
Outdated
} | ||
DataType::List(values) => { | ||
// should this be self.children[0]? | ||
let mut f = Field::try_from(values.as_ref()).unwrap(); |
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.
change to use self.children[0]?
I might prefer keep such case unhandled instead of leaving code like this.
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.
rust/src/datatypes.rs
Outdated
let mut f = Field::try_from(values.as_ref()).unwrap(); | ||
let list_arr = arr.as_any().downcast_ref::<LargeListArray>().unwrap(); | ||
f.set_dictionary(list_arr.values()); | ||
} | ||
_ => { | ||
// Add nested struct support. |
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.
Remove the comments? Any other edge case left?
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.
list support was moved to their own pr: https://github.com/eto-ai/lance/pull/664/files
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 GC
No description provided.