refactor: use list encoder / scheduler directly instead of replicating behavior in map encoder / scheduler
This is a minor simplification of the recently added map support. It does not add any functionality, only simplifies the code slightly. The current implementation creates a StructuralMapEncoder which mimics the StructuralListEncoder. This change instead wraps the StructuralListEncoder (composition instead of duplication). As a result we can get rid of the StructuralMapScheduler. The decoder then simply casts from a list array to a map array.
Since the list encoder is so simple this isn't really saving us a ton of work. However, if we choose to experiment or add new complicated features to the list encoder in the future then this will help us avoid doing the work twice or missing the changes in the map encoder.
ACTION NEEDED Lance follows the Conventional Commits specification for release automation.
The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.
For details on the error please inspect the "PR Title Check" action.
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. Credits must be used to enable repository wide code reviews.
CC @xloya do you mind reviewing? I don't feel super strongly about this so if you prefer the old approach that is ok too. Still, I think if we can avoid the map encoder having its own logic that will be helpful.
Codecov Report
:x: Patch coverage is 84.48276% with 9 lines in your changes missing coverage. Please review.
:loudspeaker: Thoughts on this report? Let us know!
I think this optimization is great! There's only one issue regarding the list field naming.