Skip to content

Allow T1Combiner to filter datapoints#336

Open
jvansanten wants to merge 3 commits intomasterfrom
skip-excluded-datapoints
Open

Allow T1Combiner to filter datapoints#336
jvansanten wants to merge 3 commits intomasterfrom
skip-excluded-datapoints

Conversation

@jvansanten
Copy link
Copy Markdown
Contributor

@jvansanten jvansanten commented Mar 31, 2026

Currently T0 and T1 ingestion are decoupled. If a AbsT1CombineUnit unit decides not to include datapoints in any state, those datapoints will still end up in the database, but will be referenced by nothing. This was not a problem as long as AbsT1CombineUnits never actually excluded datapoints, but could become so when they start implementing matching across datasets: a rough search may return datapoints that should not actually be associated, and these should not be ingested unless the AbsT1CombineUnit selects them.

This PR updates ChainedIngestionHandler so t1 and t2 directives are processed before adding t0 documents to the ingestion set. A set of datapoint ids is maintained for each filter block, and filled with the union of datapoint ids selected for t1 and point t2 docs. If the filter block has t1 or point t2 directives, datapoints are filtered by this set before being added to the t0 compiler. If no t1 or point t2 directive is configured, all datapoints are added. This prevents datapoints that are rejected by AbsT1Combiner from being ingested, while preserving existing behavior for minimal ingestion directives. A new unit test verifies this behavior.

@jvansanten jvansanten force-pushed the skip-excluded-datapoints branch from 2d714e0 to ff00773 Compare March 31, 2026 11:36
This allows t0 points to be added conditionally if they were selected for a t1 or point t2 doc. Datapoints are not filtered if neither `combine` nor `point_t2` are set. This allows the conditional logic to work correctly for multiple channels
@jvansanten jvansanten force-pushed the skip-excluded-datapoints branch from 378f86d to 804380b Compare March 31, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant