Open
Conversation
2d714e0 to
ff00773
Compare
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
378f86d to
804380b
Compare
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.
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.