-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"x || y" returns the first not false value. If x is not false value, "x || y" returns "x" itself not "true". If x is false value and y is not false value, "x || y" returns "y" itself not "true". If both "x" and "y" are false value, "x || y" returns "false". It is not changed. Before: null || "string value" -> true null || null -> false After: null || "string value" -> "string value" (changed) null || null -> false (not changed)
- Loading branch information
Showing
3 changed files
with
40 additions
and
7 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
11 changes: 11 additions & 0 deletions
11
test/command/suite/select/filter/logical_operation/or.expected
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,11 @@ | ||
table_create Users TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Users name COLUMN_SCALAR ShortText | ||
[[0,0.0,0.0],true] | ||
load --table Users | ||
[ | ||
{"name": "Alice"} | ||
] | ||
[[0,0.0,0.0],1] | ||
select Users --output_columns '_id, null || name || "unknown"' --command_version 2 | ||
[[0,0.0,0.0],[[[1],[["_id","UInt32"],["","null"]],[1,"Alice"]]]] |
11 changes: 11 additions & 0 deletions
11
test/command/suite/select/filter/logical_operation/or.test
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,11 @@ | ||
table_create Users TABLE_NO_KEY | ||
column_create Users name COLUMN_SCALAR ShortText | ||
|
||
load --table Users | ||
[ | ||
{"name": "Alice"} | ||
] | ||
|
||
select Users \ | ||
--output_columns '_id, null || name || "unknown"' \ | ||
--command_version 2 |