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.
This PR illustrates a bug with SQL LRS where certain activity definition fields can be "forgotten" when multiple instances of an activity enter the LRS, one without a definition and one with. While the name and description fields appear to be preserved, the
type
field does not.I've modified
stmt-1
in the lrs tests to have an activity type to show the issue. Note that whenstmt-0
(without a definition) precedesstmt-1
(with a definition), the resulting activity query is missing the type field. When it is the other way around,stmt-1
precedingstmt-0
, the type field shows up.The issue is resolved by updating the
lrs
lib'smerge-activity
function to allow updates to all definition fields, and to atomically update interaction activity fields.