Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroupBy uid shouldn't panic, and other logic fixes. #3232

Merged
merged 2 commits into from
Mar 30, 2019

Conversation

srfrog
Copy link
Contributor

@srfrog srfrog commented Mar 29, 2019

This PR fixes an issue with queries using @groupby(uid) directive that would cause Alpha to panic.

  1. The @groupby panic was due to the fact that we don't create tasks for children subgraphs using uid as attribute. Therefore, we don't generate DestUIDs list for them. When the groupby is processed the field is nil and we panic when it tries to access the uids from that list.
  • I have added an extra check that DestUIDs isn't nil. This will move the result list to use SrcUIDs instead which is expected.
  • No breaking changes expected from this change.

Closes #2936

This change is Reviewable

@srfrog srfrog changed the title cp pr2952 GroupBy uid shouldn't panic, and other logic fixes. Mar 29, 2019
Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @srfrog)


systest/queries_test.go, line 52 at r1 (raw file):

	t.Run("multiple block eval", wrap(MultipleBlockEval))
	t.Run("unmatched var assignment eval", wrap(UnmatchedVarEval))
	t.Run("hash index queries", wrap(QueryHashIndex))

These hash index query tests weren't in the original commit (2b943ca). Are they harmless here?

Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @danielmai)


systest/queries_test.go, line 52 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…

These hash index query tests weren't in the original commit (2b943ca). Are they harmless here?

I added them because we had no hash index tests. Harmless? Only if they pass

Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: for release/v1.0

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @danielmai)

Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@srfrog srfrog merged commit 5cc3a41 into release/v1.0 Mar 30, 2019
@srfrog srfrog deleted the srfrog/cp_pr2952 branch March 30, 2019 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants