Repository navigation
Conversation
philrz
reviewed
Nov 10, 2026
| When values of different shapes are described by one type, e.g., after | ||
| [type fusion](../type-fusion.md), the type must say which fields are absent | ||
| from some of the values. A field of type `int64|missing`, for instance, | ||
| is an `int64` where it's present and absent elsewhere. |
Contributor
There was a problem hiding this comment.
Suggested change
| is an `int64` where it's present and absent elsewhere. | |
| is an `int64` in the values that include the field and absent from the rest. |
I paused for a long time on "present". I'm not sure if my suggested alternative is correct/clearer, though.
|
|
||
| The `none` of an [option type](../../formats/model.md#29-option), e.g., | ||
| `none::int64`, isn't a plain `none`. It's a value of its option type, so | ||
| it's kept like any other value. |
Contributor
There was a problem hiding this comment.
Suggested change
| it's kept like any other value. | |
| it isn't dropped from records, arrays, or the output of `values`. |
My Claude paused here because "kept like any other value" could be read as saying none of the "handled quietly" rules above apply to an option-type none. But it still shares some of those behaviors with plain none, as summarized below, hence the narrower wording.
"Handled quietly" rule for plain none |
Applies to none::int64? |
|---|---|
dropped from values output |
no: none::int64 is output |
| disappears from records, arrays | no: {a?:none::int64}, [1,none::int64] |
| aggregates skip it | mixed: sum(this) skips it, collect(this) keeps it ([1,none::int64]) |
?? replaces it |
yes: 5 |
?. passes it through |
yes |
Comment on lines
+81
to
83
| one type, e.g., in a record type formed by | ||
| [type fusion](../super-sql/type-fusion.md), the value of | ||
| a field that is absent from the original record. |
Contributor
There was a problem hiding this comment.
Suggested change
| one type, e.g., in a record type formed by | |
| [type fusion](../super-sql/type-fusion.md), the value of | |
| a field that is absent from the original record. | |
| one type, e.g., a field of a record type formed by | |
| [type fusion](../super-sql/type-fusion.md) that is absent from some of the original records. |
philrz
reviewed
Nov 10, 2026
Comment on lines
+98
to
+105
| # spq | ||
| values {a:1},{b:2} | values a.ok(), a.ok() ?? 0 | ||
| # input | ||
|
|
||
| # expected output | ||
| 1 | ||
| 1 | ||
| 0 |
Contributor
There was a problem hiding this comment.
Suggested change
| # spq | |
| values {a:1},{b:2} | values a.ok(), a.ok() ?? 0 | |
| # input | |
| # expected output | |
| 1 | |
| 1 | |
| 0 | |
| # spq | |
| values {a:1},{b:2} | values {input:this, ok:a.ok(), with_default:a.ok() ?? 0} | |
| # input | |
| # expected output | |
| {input:{a:1},ok:1,with_default:1} | |
| {input:{b:2},with_default:0} |
I paused a bit at the combination of 2 inputs + 2 values args but only three output values. I think this way may more clearly show where the none is being dropped.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.