-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vam: Add SQL semantics for nulls in comparisons
Also add support for IS NULL expressions in vector runtime
- Loading branch information
Showing
11 changed files
with
97 additions
and
27 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 was deleted.
Oops, something went wrong.
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
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,12 @@ | ||
zed: yield a == b | ||
|
||
vector: true | ||
|
||
input: | | ||
{a:"1",b:1(uint8)} | ||
{a:127.0.0.1,b:<string>} | ||
output: | | ||
false | ||
false | ||
2 changes: 2 additions & 0 deletions
2
...e/sam/expr/ztests/compare-null-int64.yaml → runtime/ztests/expr/compare-null-int64.yaml
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
6 changes: 6 additions & 0 deletions
6
.../sam/expr/ztests/compare-null-string.yaml → runtime/ztests/expr/compare-null-string.yaml
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
zed: put eq := (a == b), ne := (a != b) | ||
|
||
vector: true | ||
|
||
input: | | ||
{a:"s",b:null(string)} | ||
{a:"s",b:null} | ||
{a:"s"} | ||
{b:null} | ||
output: | | ||
{a:"s",b:null(string),eq:null(bool),ne:null(bool)} | ||
{a:"s",b:null,eq:null(bool),ne:null(bool)} | ||
{a:"s",eq:error("missing"),ne:error("missing")} | ||
{b:null,eq:error("missing"),ne:error("missing")} |
2 changes: 2 additions & 0 deletions
2
.../ztests/filter-null-with-unset-field.yaml → ...ts/expr/filter-null-with-unset-field.yaml
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
zed: s IS NULL | ||
|
||
vector: true | ||
|
||
input: | | ||
{s:"A=B"} | ||
{s:"A=*"} | ||
|
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,17 @@ | ||
# not for vam needs does not properly handle Const bools and errors. Re-enable | ||
# the IS NOT NULL test once this works. | ||
zed: yield this IS NULL #, this IS NOT NULL | ||
|
||
vector: true | ||
|
||
input: | | ||
"foo" | ||
null(string) | ||
error("missing") | ||
error("foo") | ||
output: | | ||
false | ||
true | ||
error("missing") | ||
error("foo") |
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