Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bql/semantic/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func processPredicateBound(ce ConsumedElement) (string, string, string, *time.Ti
id, tl, tu := cmps[0][1], cmps[0][2], cmps[0][3]
pID = id
// Lower bound processing.
if strings.Index(tl, "?") != -1 {
if strings.Contains(tl, "?") {
pLowerBoundAlias = tl
} else {
stl := strings.TrimSpace(tl)
Expand All @@ -483,7 +483,7 @@ func processPredicateBound(ce ConsumedElement) (string, string, string, *time.Ti
}
}
// Lower bound processing.
if strings.Index(tu, "?") != -1 {
if strings.Contains(tu, "?") {
pUpperBoundAlias = tu
} else {
stu := strings.TrimSpace(tu)
Expand Down
6 changes: 3 additions & 3 deletions bql/table/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1347,21 +1347,21 @@ func TestFilter(t *testing.T) {
{
t: table(),
f: func(r Row) bool {
return strings.Index(r["?s"].String(), "1s") != -1
return strings.Contains(r["?s"].String(), "1s")
},
want: 2,
},
{
t: table(),
f: func(r Row) bool {
return strings.Index(r["?s"].String(), "t") != -1
return strings.Contains(r["?s"].String(), "t")
},
want: 3,
},
{
t: table(),
f: func(r Row) bool {
return strings.Index(r["?t"].String(), "t") != -1
return strings.Contains(r["?t"].String(), "t")
},
want: 0,
},
Expand Down