Skip to content

Commit

Permalink
IsRawQuery should be set via Walk()
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Mar 19, 2015
1 parent b045a00 commit 59f2591
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions influxql/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 59f2591

Please sign in to comment.