Skip to content

Pick: a full pick after ? is a value - #355

Merged
mtoy-googly-moogly merged 1 commit into
mainfrom
pick-full-tested
Nov 23, 2026
Merged

mtoy-googly-moogly merged 1 commit into
mainfrom
pick-full-tested

Conversation

@mtoy-googly-moogly

Copy link
Copy Markdown
Contributor

Companion to malloydata/malloy#3265, which settles how ? reads a pick: a pick with an else and a condition in every when is a value, and ? compares the applied value with it. Any other pick is applied, as before.

The pick section now says what a plain value in an applied when means (when 'refused' is shipping_status = 'refused'), and ends with a note on the one case that could be read two ways — a boolean in a when after ? — and how to write a pick that chooses by a condition: pick 'fast' when is_rush else 'slow'.

Should land with the malloy change.

After `?`, a pick with an `else` and a condition in every `when` is
compared with the value it picks (malloydata/malloy#3265). The pick
section now says what a plain value in an applied `when` means, and
ends with a note on the boolean `when` that could be read either way.
@mtoy-googly-moogly
mtoy-googly-moogly merged commit 75d632d into main Nov 23, 2026
5 checks passed
@mtoy-googly-moogly
mtoy-googly-moogly deleted the pick-full-tested branch November 23, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant