Skip to content

bug: materialization of the casted values

picodata> pico.sql("create table t (val double not null, primary key(val)) distributed by (val)")
2023-11-15 13:51:54.919 [80301] main/113/governor_loop I> applying pending schema change
2023-11-15 13:51:54.919 [80301] main/113/governor_loop I> calling proc_apply_schema_change, instance_id: i1
2023-11-15 13:51:54.920 [80301] main/113/governor_loop I> applied schema change on instance, instance_id: i1
2023-11-15 13:51:54.920 [80301] main/113/governor_loop I> finalizing schema change, op: DdlCommit
2023-11-15 13:51:54.921 [80301] main/113/governor_loop I> nothing to do, waiting for events to handle
---
- row_count: 1
...

picodata> pico.sql("insert into t values (cast(0 as double))")
---
- null
- 'sbroad: invalid node: VALUES rows supports only constants in its columns (got:
  Expression(Cast { child: 6, to: Double })).'
...

picodata> pico.sql("insert into t values (0)")
---
- row_count: 1
...