fix(core): derive experiment reference from result data instead of dedicated column - #1287
Open
AlessandroPomponio wants to merge 1 commit into
Open
fix(core): derive experiment reference from result data instead of dedicated column#1287AlessandroPomponio wants to merge 1 commit into
AlessandroPomponio wants to merge 1 commit into
Conversation
…dicated column Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
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
Removes the dependency on the
experiment_referencedenormalised column in the measurement-requests table for deriving experiment context. The experiment reference is now read directly from the JSON payload stored in the measurement-results table, using SQLAlchemy ORM expressions instead of raw SQL strings where applicable.High-level Changes
experiment_referencefrom the requests table now extract it viaJSON_EXTRACTon the results table, with a fallback path for the legacy nested format. Python-side deduplication (ExperimentReference.__hash__) replaces the previousCOUNT(DISTINCT experiment_reference)SQL aggregation.experiment_filterparameter removed: Theexperiment_referencecolumn is no longer used as a filter inmeasurement_requests_count_for_operationandmeasurement_results_count_for_operation, so theexperiment_filterargument has been dropped from both methods.experimentReferencecolumn mapping removed: TheexperimentReference→experiment_referenceentry has been removed fromMEASUREMENT_REQUEST_COLUMN_MAPPINGSin the filtering layer.measurement_request_by_id: The hand-written SQL string for fetching a single request by ID has been replaced with an equivalent SQLAlchemyselect()statement.samplestore_statisticsupdated: Now issues two queries instead of one; the second fetches distinct experiment-reference JSON blobs from the results table, and Python deduplicates them by major version.number_of_experimentsunchanged rather than incrementing it by one.Impact
Read paths that surface experiment information — statistics, request lookups, and the experiments-in-operation query — will derive that information from result payloads rather than the requests table. No schema migration is required for existing data as long as results contain the expected JSON fields. The
experiment_filterparameter is a breaking change for any callers of the two count methods.The code and this PR description were generated using IBM Bob and reviewed manually.