# name: benchmark/micro/cast/cast_varcharstruct_string.benchmark # description: Cast struct values with varchar fields to string # group: [cast] name Cast STRUCT -> VARCHAR group cast load CREATE TABLE structs AS SELECT { 'simple': 'red', 'needs_space': ' leading space ', 'null_field': NULL, 'null_text': 'null', 'special:char': 'value:with:colons', 'quoted''field': 'text with ''quotes''' } s FROM range(0, 10000000) tbl(i); run SELECT MIN(CAST(s AS VARCHAR)) FROM structs; result I {'simple': red, 'needs_space': ' leading space ', 'null_field': NULL, 'null_text': 'null', 'special:char': 'value:with:colons', 'quoted\'field': 'text with \'quotes\''}