-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update rule index's trie node scalars to use custom map
Earlier the trie's scalar used map[ast.Value]trieNode. This resulted in unexpected key comparison results such as 1 != 1.0 when key types were ast.Number for example. This change updates the scalar to use a util.HashMap instead that will utilize ast.Compare to perfom key comparisons. Fixes: #5585 Signed-off-by: Ashutosh Narkar <[email protected]>
- Loading branch information
1 parent
ea06d89
commit 35b2b6d
Showing
2 changed files
with
53 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cases: | ||
- input_term: "1.0" | ||
modules: | ||
- | | ||
package test | ||
p { input == 1.0 } | ||
note: "eqexpr/indexing: input is 1.0" | ||
query: data.test.p = x | ||
want_result: | ||
- x: true | ||
- input_term: "1" | ||
modules: | ||
- | | ||
package test | ||
p { input == 1.0 } | ||
note: "eqexpr/indexing: input is 1" | ||
query: data.test.p = x | ||
want_result: | ||
- x: true |