@@ -53,9 +53,9 @@ select * from struct_values;
53
53
query TT
54
54
select arrow_typeof(s1), arrow_typeof(s2) from struct_values;
55
55
----
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)
59
59
60
60
61
61
# struct[i]
@@ -229,12 +229,12 @@ select named_struct('field_a', 1, 'field_b', 2);
229
229
query T
230
230
select arrow_typeof(named_struct('first', 1, 'second', 2, 'third', 3));
231
231
----
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)
233
233
234
234
query T
235
235
select arrow_typeof({'first': 1, 'second': 2, 'third': 3});
236
236
----
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)
238
238
239
239
# test nested struct literal
240
240
query ?
@@ -443,12 +443,12 @@ select * from t;
443
443
query T
444
444
select arrow_typeof(c1) from t;
445
445
----
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)
447
447
448
448
query T
449
449
select arrow_typeof(c2) from t;
450
450
----
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)
452
452
453
453
statement ok
454
454
drop table t;
@@ -465,8 +465,8 @@ select * from t;
465
465
query T
466
466
select arrow_typeof(column1) from t;
467
467
----
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)
470
470
471
471
statement ok
472
472
drop table t;
@@ -498,9 +498,9 @@ select coalesce(s1) from t;
498
498
query T
499
499
select arrow_typeof(coalesce(s1, s2)) from t;
500
500
----
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)
504
504
505
505
statement ok
506
506
drop table t;
@@ -525,9 +525,9 @@ select coalesce(s1, s2) from t;
525
525
query T
526
526
select arrow_typeof(coalesce(s1, s2)) from t;
527
527
----
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)
531
531
532
532
statement ok
533
533
drop table t;
@@ -585,13 +585,13 @@ create table t(a struct(r varchar, c int, g float), b struct(r varchar, c float,
585
585
query T
586
586
select arrow_typeof(a) from t;
587
587
----
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)
589
589
590
590
# type of each column should not coerced but perserve as it is
591
591
query T
592
592
select arrow_typeof(b) from t;
593
593
----
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)
595
595
596
596
statement ok
597
597
drop table t;
0 commit comments