diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2021-12-08 10:19:42 +0000 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2021-12-08 10:19:42 +0000 |
| commit | 9a3a005c916479faef417f8e9437f2bf1b38ecdd (patch) | |
| tree | ba6463e4c44eb623552bc8adfe011b78a291da6b /internal | |
| parent | e70adfe0d309d511ae7598683003c92795192fe1 (diff) | |
add where clause integration test to dmap1, all mapreduce token fields are lower case
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/mapr/token.go | 4 | ||||
| -rw-r--r-- | internal/mapr/wherecondition.go | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/internal/mapr/token.go b/internal/mapr/token.go index 6ac7631..bbf4890 100644 --- a/internal/mapr/token.go +++ b/internal/mapr/token.go @@ -37,7 +37,7 @@ func tokenize(queryStr string) []token { commasStripped := strings.Replace(part, ",", " ", -1) for _, tokenStr := range strings.Fields(commasStripped) { token := token{ - str: tokenStr, + str: strings.ToLower(tokenStr), isBareword: true, } tokens = append(tokens, token) @@ -71,7 +71,7 @@ func tokensConsume(tokens []token) ([]token, []token) { stripped := t.str[1 : length-1] //dlog.Common.Trace("stripped", stripped) t := token{ - str: stripped, + str: strings.ToLower(stripped), isBareword: t.isBareword, } consumed = append(consumed, t) diff --git a/internal/mapr/wherecondition.go b/internal/mapr/wherecondition.go index 280dcfb..c2dd2a1 100644 --- a/internal/mapr/wherecondition.go +++ b/internal/mapr/wherecondition.go @@ -54,6 +54,7 @@ func (wc *whereCondition) String() string { func makeWhereConditions(tokens []token) (where []whereCondition, err error) { parse := func(tokens []token) (whereCondition, []token, error) { + var wc whereCondition if len(tokens) < 3 { err := errors.New(invalidQuery + "Not enough arguments in 'where' clause") |
