Fix export of grouping modifier

This commit is contained in:
Tristan Colgate 2016-11-04 11:06:07 +00:00
parent ec66082749
commit ab60bc3929
2 changed files with 6 additions and 4 deletions

View File

@ -176,11 +176,9 @@ func (node *BinaryExpr) String() string {
} else {
matching += "RIGHT"
}
if len(vm.Include) > 0 {
matching += fmt.Sprintf("(%s)", vm.Include)
}
}
}
return fmt.Sprintf("%s %s%s%s %s", node.LHS, node.Op, returnBool, matching, node.RHS)
}

View File

@ -95,6 +95,10 @@ func TestExprString(t *testing.T) {
},
{
in: `a - ON(b) GROUP_LEFT c`,
out: `a - ON(b) GROUP_LEFT() c`,
},
{
in: `a - ON(b) GROUP_LEFT() (c)`,
},
{
in: `a - IGNORING(b) c`,