blob: 5ba90ee7cf43ab1073598b4b84f95dea8e79f9cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
$data = [<|optionalValue: Just(4)|>,
<|optionalValue: Nothing(int32?)|>,
<|optionalValue: Just(404)|>,
<|optionalValue: Nothing(int32?)|>,];
$f = ($x) -> {
return AssumeNonStrict($x * 2);
};
SELECT YQL::IfPresent(optionalValue, $f, -5) FROM as_table($data);
|