should be it
This commit is contained in:
15
external/duckdb/benchmark/micro/cast/cast_string_struct.benchmark
vendored
Normal file
15
external/duckdb/benchmark/micro/cast/cast_string_struct.benchmark
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: benchmark/micro/cast/cast_string_struct.benchmark
|
||||
# description: Cast string values to struct
|
||||
# group: [cast]
|
||||
|
||||
name Cast VARCHAR -> STRUCT
|
||||
group cast
|
||||
|
||||
load
|
||||
CREATE TABLE structs AS SELECT {'key_A': i, 'key_B': i + 1}::VARCHAR v FROM range(0, 10000000) tbl(i);
|
||||
|
||||
run
|
||||
SELECT MIN(CAST(v AS STRUCT(key_A INT, key_B INT))) FROM structs;
|
||||
|
||||
result I
|
||||
{'key_A': 0, 'key_B': 1}
|
||||
Reference in New Issue
Block a user