Commit ee9c9637 authored by Geoff Simmons's avatar Geoff Simmons

Query evaluation uses the new function to extract fields from payloads.

parent d7f2fb35
......@@ -73,12 +73,11 @@ func (expr qExpr) testRecord(rec Record) bool {
payload = bytes.TrimLeft(payload, " \t\n\r")
}
if expr.lhs.field > 0 {
fld := expr.lhs.field
flds := bytes.Fields(payload)
if fld > len(flds) {
min, max, ok := fieldNDelims(payload, expr.lhs.field-1)
if !ok {
return false
}
payload = flds[fld-1]
payload = payload[min:max]
}
if expr.rhs.rhsType == empty {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment