-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ColumnName tracks a path of field names instead of a simple string (#445
) ## What changes are proposed in this pull request? Previously, `ColumnName` tracked a simple string, which could be split at `.` to obtain a path of field names. But this breaks down if a field name contains any special characters that might interfere with the interpretation of a dot character. To solve this, update `ColumnName` to track an actual path of field names instead. Update all call sites as needed to support the new idiom. This PR also includes code for reliably parsing strings into `ColumnName` using period as field separator and backticks as delimiters for field names containing special characters, e.g: ```rust assert_eq!(ColumnName::new(["a", "b c", "d"]).to_string(), "a.`b c`.d"); ``` NOTE: This change does _not_ magically make all operations nesting-aware. For example, code that loops over the field names of a `StructType` will continue to see nested column names as not-matched. Fixing those call sites is left as future work, tho obvious ones are flagged here as TODO. Resolves #443 ### This PR affects the following public APIs The "shape" of `ColumnName` changes from string-like to slice-of-string-like, and its methods change accordingly. This change is needed because otherwise we cannot reliably handle arbitrary field names. ## How was this change tested? Extensive new and existing unit tests.
- Loading branch information
Showing
13 changed files
with
494 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.