Apply channels.filters at read time (#103) - #104
Open
tombonfert wants to merge 4 commits into
Open
tombonfert wants to merge 4 commits into
tombonfert wants to merge 4 commits into
Conversation
Wire per-table equality filters into `_prepare_channels_join` so the channels table is filtered after `column_name_mapping` and before the UDF-column projection. Update configuration docs to list `channels` as a filters-supported table and clarify filter value coercion. Add end-to-end unit tests covering string, non-matching, and boolean channel filters.
Add a QueryEngine validator that blocks `channels.filters` entries targeting the `is_plausible` column when `data_type=RAW`, since those filters run before raw encoding and bridge intervals across dropped implausible samples. Direct users to `drop_implausible_data=True` instead. Update configuration docs with the new internal columns and a caution callout. Add unit tests covering mapped plausibility columns, non-plausibility filters, and RLE mode.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
+ Coverage 89.78% 89.80% +0.01%
==========================================
Files 62 62
Lines 5717 5726 +9
Branches 716 719 +3
==========================================
+ Hits 5133 5142 +9
Misses 463 463
Partials 121 121
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SolverConfig.channelsaccepted afiltersdict but the engine never applied it, so channel-table filters were silently dropped. This wires them up and adds a guardrail against the one way the feature can be misused.Changes
channels.filtersinDefaultSolver._prepare_channels_join, aftercolumn_name_mappingand before the UDF-column projection, using the same equality-filter mechanism ascontainer_tags,container_metrics, andchannel_mapping. Applying it before the projection lets a filter reference any channels column, including dimension columns the solve step drops.data_type = RAWandchannels.filterstargetsis_plausible. Such a filter runs before raw encoding and would bridge intervals across dropped samples;drop_implausible_datais the correct tool (it drops inside the encoder, so boundaries stay correct). The check keys off the internalis_plausiblename, so it also catches a physical column mapped to it."true"/"false"), added the previously undocumentedis_plausibleandtimestampinternal names to the mapping table, and added a RAW-mode caveat. Also corrected a stale "RAW to RLE" error string to "RAW to interval" (the drop works for both raw encoders).Test Plan
Checklist