From adaa97e250e734d5465e69d809f723ab3ab9b102 Mon Sep 17 00:00:00 2001 From: srfrog Date: Mon, 18 Mar 2019 14:53:39 -0700 Subject: [PATCH 1/2] query/query.go: turn obsolete error into warning The default value logic obseleted this error. When generating the output graph we already have all the values necessary. This error was when we needed to match uidToVal to NeedsVar. --- query/query.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/query/query.go b/query/query.go index cdafecd5889..eb0cb6c42f4 100644 --- a/query/query.go +++ b/query/query.go @@ -340,7 +340,8 @@ func aggWithVarFieldName(pc *SubGraph) string { func addInternalNode(pc *SubGraph, uid uint64, dst outputNode) error { if len(pc.Params.uidToVal) == 0 { - return x.Errorf("Wrong use of var() with %v.", pc.Params.NeedsVar) + glog.V(2).Infof("Wrong use of var() with %v.", pc.Params.NeedsVar) + return nil } sv, ok := pc.Params.uidToVal[uid] if !ok || sv.Value == nil { From 0271b03557f8b3d4fa72969cb9d56bb6470aa4b7 Mon Sep 17 00:00:00 2001 From: srfrog Date: Tue, 26 Mar 2019 16:53:51 -0700 Subject: [PATCH 2/2] query/query.go: remove info log --- query/query.go | 1 - 1 file changed, 1 deletion(-) diff --git a/query/query.go b/query/query.go index eb0cb6c42f4..8c27246b29a 100644 --- a/query/query.go +++ b/query/query.go @@ -340,7 +340,6 @@ func aggWithVarFieldName(pc *SubGraph) string { func addInternalNode(pc *SubGraph, uid uint64, dst outputNode) error { if len(pc.Params.uidToVal) == 0 { - glog.V(2).Infof("Wrong use of var() with %v.", pc.Params.NeedsVar) return nil } sv, ok := pc.Params.uidToVal[uid]