Fixed select bug (#958)

This commit is contained in:
Mike Farah
2021-10-07 15:04:36 +11:00
parent e87808683a
commit 839f795710
2 changed files with 33 additions and 8 deletions
+22
View File
@@ -5,6 +5,28 @@ import (
)
var selectOperatorScenarios = []expressionScenario{
{
skipDoc: true,
document: `cat`,
expression: `select(false, true)`,
expected: []string{
"D0, P[], (doc)::cat\n",
},
},
{
skipDoc: true,
document: `cat`,
expression: `select(true, false)`,
expected: []string{
"D0, P[], (doc)::cat\n",
},
},
{
skipDoc: true,
document: `cat`,
expression: `select(false)`,
expected: []string{},
},
{
description: "Select elements from array",
document: `[cat,goat,dog]`,