Skip to content

Commit 3f3c3e5

Browse files
update boolean filter docs (#256)
1 parent c84b0a1 commit 3f3c3e5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/documentation/language/filter-expressions.malloynb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,16 @@ Temporal filter expressions can be combined with <code>and</code> and <code>or</
168168

169169
# Boolean Filter Expressions
170170

171-
Because a boolean value might equal NULL, there are the following boolean filters.
171+
Because a boolean value might equal NULL, the true `true` and `false` filters treat `NULL` as a false value. The other filters (`=true` and `=false`) maintain the SQL semantic where a `NULL` value input produces a `NULL` output.
172+
173+
| **Boolean Filter Expression** | True Input | False Input | Null Input |
174+
| ----- | ----- | ----- | ---- |
175+
| <code>true</code> | `true` | `false` | `false` |
176+
| <code>=true</code> | `true` | `false` | `NULL` |
177+
| <code>false</code> | `false` | `true` | `false` |
178+
| <code>=false</code> | `false` | `true` | `NULL` |
179+
| <code>null</code> | `false` | `false` | `true` |
172180

173-
| **Boolean Filter Expression** | **Meaning** |
174-
| ----- | ----- |
175-
| <code>true</code> | Value is `true` |
176-
| <code>false</code> | Value is `false` or `NULL` (the inverse of `true`)|
177-
| <code>=false</code> | Value is `false` |
178-
| <code>null</code> | Value is `NULL` |
179181

180182
Boolean filters are negated with `not`. There are no combination or grouping operators.
181183

0 commit comments

Comments
 (0)