Skip to content

Commit cbe1e7d

Browse files
authored
expr: add explicit strict-mode const (#94838)
expr: add explicit strict-mode value
1 parent 42016dc commit cbe1e7d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/expr/query.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ type ReduceSettings struct {
9696
type ReduceMode string
9797

9898
const (
99+
// Default mode
100+
ReduceModeStrict = ""
101+
99102
// Drop non-numbers
100103
ReduceModeDrop ReduceMode = "dropNN"
101104

pkg/expr/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (h *ExpressionQueryReader) ReadQuery(
7474
}
7575
if err == nil && q.Settings != nil {
7676
switch q.Settings.Mode {
77-
case "":
77+
case ReduceModeStrict:
7878
mapper = nil
7979
case ReduceModeDrop:
8080
mapper = mathexp.DropNonNumber{}

0 commit comments

Comments
 (0)