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

Make uid function work with value variables in upsert blocks #4425

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

campoy
Copy link
Contributor

@campoy campoy commented Dec 16, 2019

Currently, only variables containing UIDs (e.g. uid as uid) work correctly
when used in upsert blocks with the uid function.

With this fix, all variables (e.g. value as value) work appropriately, as we
fetch the list of UIDs from the keys in the value map when needed.

Fixes #4424


This change is Reviewable

Currently, only variables containing UIDs (e.g. `uid as uid`) work correctly
when used in upsert blocks with the `uid` function.

With this fix, all variables (e.g. `value as value`) work appropriately, as we
fetch the list of UIDs from the keys in the value map when needed.

Fixes #4424
@campoy campoy requested review from manishrjain and a team as code owners December 16, 2019 22:55
Copy link
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

Other than the test you are working on and a minor comment it :lgtm:

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


edgraph/server.go, line 763 at r1 (raw file):

		// If the list of UIDs is empty but the map of values is not,
		// we need to get the UIDs from the keys in the map.

minor: this probably fits in a single line. Ignore if it doesn't.

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:

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @campoy and @manishrjain)

@campoy campoy merged commit f4e3590 into master Dec 17, 2019
@campoy campoy deleted the campoy/4424 branch December 17, 2019 00:37
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.

uid function not working in upsert for variables with values
3 participants