dynamic_variant.sql 257 B

1234567
  1. $dt = Int32;
  2. $tvt = Variant<$dt,$dt>;
  3. select ListMap([(10,0us),(20,2us)],($x)->(DynamicVariant($x.0,$x.1,$tvt)));
  4. $dt = Int32;
  5. $svt = Variant<x:$dt,y:$dt>;
  6. select ListMap([(10,'x'),(20,'z'),(30,null)],($x)->(DynamicVariant($x.0,cast($x.1 as utf8),$svt)));