-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Dev] Make the various mappings in MultiFileReaderData
typesafe
#16596
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
[Dev] Make the various mappings in MultiFileReaderData
typesafe
#16596
Conversation
…s to help understand the various contexts that idx_ts are used in, mostly to figure out what is impacted and how when we rework this to create BoundExpressions instead and apply those in FinalizeChunk
…ti_file_reader_mapping_demystification
This PR now also does this proposed next step of making it actually typesafe For example the logic in |
…tant index or a local index, and retrieved in the same way
MultiFileReaderData
MultiFileReaderData
typesafe
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.
Thanks! Looks good to me (after CI passes).
Thanks! |
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
[Dev] Make the various mappings in `MultiFileReaderData` typesafe (duckdb/duckdb#16596) Issue template: direct UI issues to the UI repository (duckdb/duckdb#16619)
This PR does not change anything functionality-wise
In the
MultiFileReaderData
we have many mappings, used in various contexts, and many of these mappings are tied to each other - if one changes, the other should also change.All of these were using
idx_t
, which made it very confusing and error-prone to use and understand what type of index is required and produced.This PR introduces the following structs as typesafe replacements:
MultiFileLocalColumnId
MultiFileLocalIndex
MultiFileGlobalIndex
MultiFileConstantMapIndex
MultiFileLocalColumnIds
MultiFileColumnMapping
MultiFileFilterMap
MultiFileConstantMap
MultiFileCastMap
column_ids, column_mapping, filter_map, constant_map and cast_map are indexed with and produce the typed indexes
MultiFileFilterEntry
has been changed to produceMultiFileConstantMapIndex
orMultiFileLocalIndex
depending on the way it was set.