Allow the result of count(uid) to be assigned to a var.#2947
Allow the result of count(uid) to be assigned to a var.#2947
Conversation
Allow expressions of the form "f as count(uid)". When resolving the value of such a variable inside a math block it gets treated as a constant.
manishrjain
left a comment
There was a problem hiding this comment.
Looks good. Just remove the glog.Infof.
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)
query/query.go, line 1505 at r1 (raw file):
} glog.Infof("value %v", int64(len(sg.DestUIDs.Uids)))
Don't add logs in query execution paths. They can get very expensive.
srfrog
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain)
query/query.go, line 1505 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Don't add logs in query execution paths. They can get very expensive.
oops actually that was a debug check. thanks for noticing
srfrog
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain)
martinmr
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain)
query/query.go, line 1505 at r1 (raw file):
Previously, srfrog (Gus) wrote…
oops actually that was a debug check. thanks for noticing
Done. Thanks for catching this, this was just a debug check.
Allow expressions of the form "f as count(uid)". When resolving the value of such a variable inside a math block it gets treated as a constant.
Allow expressions of the form "f as count(uid)".
When resolving the value of such a variable inside a math block it gets
treated as a constant.
This change is