Uh oh!
There was an error while loading. Please reload this page.
ARROW-7412: [C++][Dataset] Provide FieldRef to disambiguate field references - #6545
ARROW-7412: [C++][Dataset] Provide FieldRef to disambiguate field references#6545bkietz wants to merge 12 commits into
Conversation
19ac3c1 to
43d3c51Compare
pitrou
left a comment
There was a problem hiding this comment.
I guess I'm mostly concerned about the variant injection into widely-used headers, and the lack of tests for small_vector.
I haven't looked into the FieldRef implementation closely.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Hmm, it's a pity to start pulling the variant header in such a widely-used header...
There was a problem hiding this comment.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2b1fd40 to
cb5aa1bComparenealrichardson
commented
Mar 11, 2020
@fsaintjacques you need this for your logical plan? Can you please review/merge? |
pitrou
left a comment
There was a problem hiding this comment.
Thank you for the update. Two remaining questions below.
There was a problem hiding this comment.
Are we ignoring other potential matches here? FindAll could return multiple matches if there are columns with the same name, no?
There was a problem hiding this comment.
On line 103, I assert that there are not multiple matches
There was a problem hiding this comment.
Uh, looks like I forgot my glasses somewhere... where?
There was a problem hiding this comment.
CheckNonMultiple returns an error status if there are multiple matches
Uh oh!
There was an error while loading. Please reload this page.
fsaintjacques
commented
Mar 13, 2020
After offline conversation with Ben, |
cb5aa1b to
08013e8Compare
fsaintjacques
left a comment
There was a problem hiding this comment.
The comment documentation is A+ for an important class like this.
FieldRefis a new utility class which represents a reference to a field. It is intended to replace parameters likeint field_indexandconst std::string& name; it can be implicitly constructed from either a field index or a name.Nested fields can be referenced as well:
FieldRefs provide a number of accessors for drilling down to potentially nested children. They are overloaded for convenience to support Schema (returns a field), DataType (returns a child field), Field (returns a child field of this field's type) Array (returns a child array), RecordBatch (returns a column), ChunkedArray (returns a ChunkedArray where each chunk is a child array of the corresponding original chunk) and Table (returns a column).