@@ -53,9 +53,9 @@ select * from struct_values;
5353query TT
5454select arrow_typeof(s1), arrow_typeof(s2) from struct_values;
5555----
56- Struct([Field { name: "c0", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] ) Struct([Field { name: "a", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
57- Struct([Field { name: "c0", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] ) Struct([Field { name: "a", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
58- Struct([Field { name: "c0", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] ) Struct([Field { name: "a", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
56+ Struct(c0 Int32) Struct(a Int32, b Utf8)
57+ Struct(c0 Int32) Struct(a Int32, b Utf8)
58+ Struct(c0 Int32) Struct(a Int32, b Utf8)
5959
6060
6161# struct[i]
@@ -229,12 +229,12 @@ select named_struct('field_a', 1, 'field_b', 2);
229229query T
230230select arrow_typeof(named_struct('first', 1, 'second', 2, 'third', 3));
231231----
232- Struct([Field { name: " first", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: " second", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: " third", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
232+ Struct(first Int64, second Int64, third Int64)
233233
234234query T
235235select arrow_typeof({'first': 1, 'second': 2, 'third': 3});
236236----
237- Struct([Field { name: " first", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: " second", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: " third", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
237+ Struct(first Int64, second Int64, third Int64)
238238
239239# test nested struct literal
240240query ?
@@ -443,12 +443,12 @@ select * from t;
443443query T
444444select arrow_typeof(c1) from t;
445445----
446- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
446+ Struct(r Utf8, b Int32)
447447
448448query T
449449select arrow_typeof(c2) from t;
450450----
451- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
451+ Struct(r Utf8, b Float32)
452452
453453statement ok
454454drop table t;
@@ -465,8 +465,8 @@ select * from t;
465465query T
466466select arrow_typeof(column1) from t;
467467----
468- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "c", data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
469- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "c", data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
468+ Struct(r Utf8, c Float64)
469+ Struct(r Utf8, c Float64)
470470
471471statement ok
472472drop table t;
@@ -498,9 +498,9 @@ select coalesce(s1) from t;
498498query T
499499select arrow_typeof(coalesce(s1, s2)) from t;
500500----
501- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
502- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
503- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
501+ Struct(a Float32, b Utf8)
502+ Struct(a Float32, b Utf8)
503+ Struct(a Float32, b Utf8)
504504
505505statement ok
506506drop table t;
@@ -525,9 +525,9 @@ select coalesce(s1, s2) from t;
525525query T
526526select arrow_typeof(coalesce(s1, s2)) from t;
527527----
528- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
529- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
530- Struct([Field { name: "a", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "b", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
528+ Struct(a Float32, b Utf8)
529+ Struct(a Float32, b Utf8)
530+ Struct(a Float32, b Utf8)
531531
532532statement ok
533533drop table t;
@@ -585,13 +585,13 @@ create table t(a struct(r varchar, c int, g float), b struct(r varchar, c float,
585585query T
586586select arrow_typeof(a) from t;
587587----
588- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "c", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "g", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
588+ Struct(r Utf8, c Int32, g Float32)
589589
590590# type of each column should not coerced but perserve as it is
591591query T
592592select arrow_typeof(b) from t;
593593----
594- Struct([Field { name: "r", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "c", data_type: Float32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "g", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }] )
594+ Struct(r Utf8, c Float32, g Int32)
595595
596596statement ok
597597drop table t;
0 commit comments