From 59f25910c6ada48a61f19ee7282016f0dd7b1f38 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 19 Mar 2015 16:21:17 -0700 Subject: [PATCH] IsRawQuery should be set via Walk() --- influxql/parser.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/influxql/parser.go b/influxql/parser.go index 049d6d8088c..86c0e065280 100644 --- a/influxql/parser.go +++ b/influxql/parser.go @@ -579,12 +579,11 @@ func (p *Parser) parseSelectStatement(tr targetRequirement) (*SelectStatement, e // Set if the query is a raw data query or one with an aggregate stmt.IsRawQuery = true - for _, d := range stmt.Fields { - if _, ok := d.Expr.(*Call); ok { + WalkFunc(stmt.Fields, func(n Node) { + if _, ok := n.(*Call); ok { stmt.IsRawQuery = false - break } - } + }) return stmt, nil }