From 8340b9ea640c2ffad7d1f4b6b2d74423e7829af4 Mon Sep 17 00:00:00 2001 From: Nia Weiss Date: Thu, 22 Oct 2020 11:03:51 -0400 Subject: [PATCH] re-apply single equals fix --- executor.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/executor.go b/executor.go index ea3d472aa..f50738cd6 100644 --- a/executor.go +++ b/executor.go @@ -5134,6 +5134,19 @@ func (e *executor) translateCall(c *pql.Call, index string, columnKeys map[strin if err := fieldValidateValue(f, arg); err != nil { return nil, errors.Wrap(err, "validating field parameter value") } + if c.Name == "Row" { + switch f.Type() { + case FieldTypeInt, FieldTypeDecimal: + if _, ok := arg.(*pql.Condition); !ok { + // This is workaround to support pql.ASSIGN ('=') as condition ('==') for int and decimal fields. + arg = &pql.Condition{ + Op: pql.EQ, + Value: arg, + } + c.Args[field] = arg + } + } + } switch arg := arg.(type) { case string: if translation, ok := indexRows[field][arg]; ok {