should be it
This commit is contained in:
22
external/duckdb/benchmark/micro/cast/cast_varcharstruct_string.benchmark
vendored
Normal file
22
external/duckdb/benchmark/micro/cast/cast_varcharstruct_string.benchmark
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# name: benchmark/micro/cast/cast_varcharstruct_string.benchmark
|
||||
# description: Cast struct values with varchar fields to string
|
||||
# group: [cast]
|
||||
|
||||
name Cast STRUCT<VARCHAR> -> 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\''}
|
||||
Reference in New Issue
Block a user