@@ -733,17 +733,17 @@ async fn test_arrow() {
733
733
let batches = run_query ( "select name, json_data->'foo' from test" ) . await . unwrap ( ) ;
734
734
735
735
let expected = [
736
- "+------------------+--------------------------+" ,
737
- "| name | json_data -> Utf8(\" foo\" ) |" ,
738
- "+------------------+--------------------------+" ,
739
- "| object_foo | {str=abc} |" ,
740
- "| object_foo_array | {array=[1]} |" ,
741
- "| object_foo_obj | {object={}} |" ,
742
- "| object_foo_null | {null=} |" ,
743
- "| object_bar | {null=} |" ,
744
- "| list_foo | {null=} |" ,
745
- "| invalid_json | {null=} |" ,
746
- "+------------------+--------------------------+" ,
736
+ "+------------------+------------------------------- +" ,
737
+ "| name | test. json_data -> Utf8(\" foo\" ) |" ,
738
+ "+------------------+------------------------------- +" ,
739
+ "| object_foo | {str=abc} |" ,
740
+ "| object_foo_array | {array=[1]} |" ,
741
+ "| object_foo_obj | {object={}} |" ,
742
+ "| object_foo_null | {null=} |" ,
743
+ "| object_bar | {null=} |" ,
744
+ "| list_foo | {null=} |" ,
745
+ "| invalid_json | {null=} |" ,
746
+ "+------------------+------------------------------- +" ,
747
747
] ;
748
748
assert_batches_eq ! ( expected, & batches) ;
749
749
}
@@ -753,7 +753,7 @@ async fn test_plan_arrow() {
753
753
let lines = logical_plan ( r#"explain select json_data->'foo' from test"# ) . await ;
754
754
755
755
let expected = [
756
- "Projection: json_get(test.json_data, Utf8(\" foo\" )) AS json_data -> Utf8(\" foo\" )" ,
756
+ "Projection: json_get(test.json_data, Utf8(\" foo\" )) AS test. json_data -> Utf8(\" foo\" )" ,
757
757
" TableScan: test projection=[json_data]" ,
758
758
] ;
759
759
@@ -765,17 +765,17 @@ async fn test_long_arrow() {
765
765
let batches = run_query ( "select name, json_data->>'foo' from test" ) . await . unwrap ( ) ;
766
766
767
767
let expected = [
768
- "+------------------+---------------------------+" ,
769
- "| name | json_data ->> Utf8(\" foo\" ) |" ,
770
- "+------------------+---------------------------+" ,
771
- "| object_foo | abc |" ,
772
- "| object_foo_array | [1] |" ,
773
- "| object_foo_obj | {} |" ,
774
- "| object_foo_null | |" ,
775
- "| object_bar | |" ,
776
- "| list_foo | |" ,
777
- "| invalid_json | |" ,
778
- "+------------------+---------------------------+" ,
768
+ "+------------------+-------------------------------- +" ,
769
+ "| name | test. json_data ->> Utf8(\" foo\" ) |" ,
770
+ "+------------------+-------------------------------- +" ,
771
+ "| object_foo | abc |" ,
772
+ "| object_foo_array | [1] |" ,
773
+ "| object_foo_obj | {} |" ,
774
+ "| object_foo_null | |" ,
775
+ "| object_bar | |" ,
776
+ "| list_foo | |" ,
777
+ "| invalid_json | |" ,
778
+ "+------------------+-------------------------------- +" ,
779
779
] ;
780
780
assert_batches_eq ! ( expected, & batches) ;
781
781
}
@@ -785,7 +785,7 @@ async fn test_plan_long_arrow() {
785
785
let lines = logical_plan ( r#"explain select json_data->>'foo' from test"# ) . await ;
786
786
787
787
let expected = [
788
- "Projection: json_as_text(test.json_data, Utf8(\" foo\" )) AS json_data ->> Utf8(\" foo\" )" ,
788
+ "Projection: json_as_text(test.json_data, Utf8(\" foo\" )) AS test. json_data ->> Utf8(\" foo\" )" ,
789
789
" TableScan: test projection=[json_data]" ,
790
790
] ;
791
791
@@ -799,17 +799,17 @@ async fn test_long_arrow_eq_str() {
799
799
. unwrap ( ) ;
800
800
801
801
let expected = [
802
- "+------------------+-----------------------------------------+" ,
803
- "| name | json_data ->> Utf8(\" foo\" ) = Utf8(\" abc\" ) |" ,
804
- "+------------------+-----------------------------------------+" ,
805
- "| object_foo | true |" ,
806
- "| object_foo_array | false |" ,
807
- "| object_foo_obj | false |" ,
808
- "| object_foo_null | |" ,
809
- "| object_bar | |" ,
810
- "| list_foo | |" ,
811
- "| invalid_json | |" ,
812
- "+------------------+-----------------------------------------+" ,
802
+ "+------------------+---------------------------------------------- +" ,
803
+ "| name | test. json_data ->> Utf8(\" foo\" ) = Utf8(\" abc\" ) |" ,
804
+ "+------------------+---------------------------------------------- +" ,
805
+ "| object_foo | true |" ,
806
+ "| object_foo_array | false |" ,
807
+ "| object_foo_obj | false |" ,
808
+ "| object_foo_null | |" ,
809
+ "| object_bar | |" ,
810
+ "| list_foo | |" ,
811
+ "| invalid_json | |" ,
812
+ "+------------------+---------------------------------------------- +" ,
813
813
] ;
814
814
assert_batches_eq ! ( expected, & batches) ;
815
815
}
@@ -836,7 +836,7 @@ async fn test_plan_arrow_cast_int() {
836
836
let lines = logical_plan ( r#"explain select (json_data->'foo')::int from test"# ) . await ;
837
837
838
838
let expected = [
839
- "Projection: json_get_int(test.json_data, Utf8(\" foo\" )) AS json_data -> Utf8(\" foo\" )" ,
839
+ "Projection: json_get_int(test.json_data, Utf8(\" foo\" )) AS test. json_data -> Utf8(\" foo\" )" ,
840
840
" TableScan: test projection=[json_data]" ,
841
841
] ;
842
842
@@ -848,17 +848,17 @@ async fn test_arrow_double_nested() {
848
848
let batches = run_query ( "select name, json_data->'foo'->0 from test" ) . await . unwrap ( ) ;
849
849
850
850
let expected = [
851
- "+------------------+--------------------------------------+" ,
852
- "| name | json_data -> Utf8(\" foo\" ) -> Int64(0) |" ,
853
- "+------------------+--------------------------------------+" ,
854
- "| object_foo | {null=} |" ,
855
- "| object_foo_array | {int=1} |" ,
856
- "| object_foo_obj | {null=} |" ,
857
- "| object_foo_null | {null=} |" ,
858
- "| object_bar | {null=} |" ,
859
- "| list_foo | {null=} |" ,
860
- "| invalid_json | {null=} |" ,
861
- "+------------------+--------------------------------------+" ,
851
+ "+------------------+------------------------------------------- +" ,
852
+ "| name | test. json_data -> Utf8(\" foo\" ) -> Int64(0) |" ,
853
+ "+------------------+------------------------------------------- +" ,
854
+ "| object_foo | {null=} |" ,
855
+ "| object_foo_array | {int=1} |" ,
856
+ "| object_foo_obj | {null=} |" ,
857
+ "| object_foo_null | {null=} |" ,
858
+ "| object_bar | {null=} |" ,
859
+ "| list_foo | {null=} |" ,
860
+ "| invalid_json | {null=} |" ,
861
+ "+------------------+------------------------------------------- +" ,
862
862
] ;
863
863
assert_batches_eq ! ( expected, & batches) ;
864
864
}
@@ -868,7 +868,7 @@ async fn test_plan_arrow_double_nested() {
868
868
let lines = logical_plan ( r#"explain select json_data->'foo'->0 from test"# ) . await ;
869
869
870
870
let expected = [
871
- "Projection: json_get(test.json_data, Utf8(\" foo\" ), Int64(0)) AS json_data -> Utf8(\" foo\" ) -> Int64(0)" ,
871
+ "Projection: json_get(test.json_data, Utf8(\" foo\" ), Int64(0)) AS test. json_data -> Utf8(\" foo\" ) -> Int64(0)" ,
872
872
" TableScan: test projection=[json_data]" ,
873
873
] ;
874
874
@@ -882,17 +882,17 @@ async fn test_arrow_double_nested_cast() {
882
882
. unwrap ( ) ;
883
883
884
884
let expected = [
885
- "+------------------+--------------------------------------+" ,
886
- "| name | json_data -> Utf8(\" foo\" ) -> Int64(0) |" ,
887
- "+------------------+--------------------------------------+" ,
888
- "| object_foo | |" ,
889
- "| object_foo_array | 1 |" ,
890
- "| object_foo_obj | |" ,
891
- "| object_foo_null | |" ,
892
- "| object_bar | |" ,
893
- "| list_foo | |" ,
894
- "| invalid_json | |" ,
895
- "+------------------+--------------------------------------+" ,
885
+ "+------------------+------------------------------------------- +" ,
886
+ "| name | test. json_data -> Utf8(\" foo\" ) -> Int64(0) |" ,
887
+ "+------------------+------------------------------------------- +" ,
888
+ "| object_foo | |" ,
889
+ "| object_foo_array | 1 |" ,
890
+ "| object_foo_obj | |" ,
891
+ "| object_foo_null | |" ,
892
+ "| object_bar | |" ,
893
+ "| list_foo | |" ,
894
+ "| invalid_json | |" ,
895
+ "+------------------+------------------------------------------- +" ,
896
896
] ;
897
897
assert_batches_eq ! ( expected, & batches) ;
898
898
}
@@ -902,7 +902,7 @@ async fn test_plan_arrow_double_nested_cast() {
902
902
let lines = logical_plan ( r#"explain select (json_data->'foo'->0)::int from test"# ) . await ;
903
903
904
904
let expected = [
905
- "Projection: json_get_int(test.json_data, Utf8(\" foo\" ), Int64(0)) AS json_data -> Utf8(\" foo\" ) -> Int64(0)" ,
905
+ "Projection: json_get_int(test.json_data, Utf8(\" foo\" ), Int64(0)) AS test. json_data -> Utf8(\" foo\" ) -> Int64(0)" ,
906
906
" TableScan: test projection=[json_data]" ,
907
907
] ;
908
908
@@ -953,17 +953,17 @@ async fn test_lexical_precedence_wrong() {
953
953
#[ tokio:: test]
954
954
async fn test_question_mark_contains ( ) {
955
955
let expected = [
956
- "+------------------+-------------------------+" ,
957
- "| name | json_data ? Utf8(\" foo\" ) |" ,
958
- "+------------------+-------------------------+" ,
959
- "| object_foo | true |" ,
960
- "| object_foo_array | true |" ,
961
- "| object_foo_obj | true |" ,
962
- "| object_foo_null | true |" ,
963
- "| object_bar | false |" ,
964
- "| list_foo | false |" ,
965
- "| invalid_json | false |" ,
966
- "+------------------+-------------------------+" ,
956
+ "+------------------+------------------------------ +" ,
957
+ "| name | test. json_data ? Utf8(\" foo\" ) |" ,
958
+ "+------------------+------------------------------ +" ,
959
+ "| object_foo | true |" ,
960
+ "| object_foo_array | true |" ,
961
+ "| object_foo_obj | true |" ,
962
+ "| object_foo_null | true |" ,
963
+ "| object_bar | false |" ,
964
+ "| list_foo | false |" ,
965
+ "| invalid_json | false |" ,
966
+ "+------------------+------------------------------ +" ,
967
967
] ;
968
968
969
969
let batches = run_query ( "select name, json_data ? 'foo' from test" ) . await . unwrap ( ) ;
@@ -1056,17 +1056,17 @@ async fn test_arrow_union_is_null() {
1056
1056
. unwrap ( ) ;
1057
1057
1058
1058
let expected = [
1059
- "+------------------+----------------------------------+" ,
1060
- "| name | json_data -> Utf8(\" foo\" ) IS NULL |" ,
1061
- "+------------------+----------------------------------+" ,
1062
- "| object_foo | false |" ,
1063
- "| object_foo_array | false |" ,
1064
- "| object_foo_obj | false |" ,
1065
- "| object_foo_null | true |" ,
1066
- "| object_bar | true |" ,
1067
- "| list_foo | true |" ,
1068
- "| invalid_json | true |" ,
1069
- "+------------------+----------------------------------+" ,
1059
+ "+------------------+--------------------------------------- +" ,
1060
+ "| name | test. json_data -> Utf8(\" foo\" ) IS NULL |" ,
1061
+ "+------------------+--------------------------------------- +" ,
1062
+ "| object_foo | false |" ,
1063
+ "| object_foo_array | false |" ,
1064
+ "| object_foo_obj | false |" ,
1065
+ "| object_foo_null | true |" ,
1066
+ "| object_bar | true |" ,
1067
+ "| list_foo | true |" ,
1068
+ "| invalid_json | true |" ,
1069
+ "+------------------+--------------------------------------- +" ,
1070
1070
] ;
1071
1071
assert_batches_eq ! ( expected, & batches) ;
1072
1072
}
@@ -1078,17 +1078,17 @@ async fn test_arrow_union_is_not_null() {
1078
1078
. unwrap ( ) ;
1079
1079
1080
1080
let expected = [
1081
- "+------------------+--------------------------------------+" ,
1082
- "| name | json_data -> Utf8(\" foo\" ) IS NOT NULL |" ,
1083
- "+------------------+--------------------------------------+" ,
1084
- "| object_foo | true |" ,
1085
- "| object_foo_array | true |" ,
1086
- "| object_foo_obj | true |" ,
1087
- "| object_foo_null | false |" ,
1088
- "| object_bar | false |" ,
1089
- "| list_foo | false |" ,
1090
- "| invalid_json | false |" ,
1091
- "+------------------+--------------------------------------+" ,
1081
+ "+------------------+------------------------------------------- +" ,
1082
+ "| name | test. json_data -> Utf8(\" foo\" ) IS NOT NULL |" ,
1083
+ "+------------------+------------------------------------------- +" ,
1084
+ "| object_foo | true |" ,
1085
+ "| object_foo_array | true |" ,
1086
+ "| object_foo_obj | true |" ,
1087
+ "| object_foo_null | false |" ,
1088
+ "| object_bar | false |" ,
1089
+ "| list_foo | false |" ,
1090
+ "| invalid_json | false |" ,
1091
+ "+------------------+------------------------------------------- +" ,
1092
1092
] ;
1093
1093
assert_batches_eq ! ( expected, & batches) ;
1094
1094
}
@@ -1119,14 +1119,14 @@ async fn test_long_arrow_cast() {
1119
1119
let batches = run_query ( "select (json_data->>'foo')::int from other" ) . await . unwrap ( ) ;
1120
1120
1121
1121
let expected = [
1122
- "+---------------------------+" ,
1123
- "| json_data ->> Utf8(\" foo\" ) |" ,
1124
- "+---------------------------+" ,
1125
- "| 42 |" ,
1126
- "| 42 |" ,
1127
- "| |" ,
1128
- "| |" ,
1129
- "+---------------------------+" ,
1122
+ "+--------------------------------- +" ,
1123
+ "| other. json_data ->> Utf8(\" foo\" ) |" ,
1124
+ "+--------------------------------- +" ,
1125
+ "| 42 |" ,
1126
+ "| 42 |" ,
1127
+ "| |" ,
1128
+ "| |" ,
1129
+ "+--------------------------------- +" ,
1130
1130
] ;
1131
1131
assert_batches_eq ! ( expected, & batches) ;
1132
1132
}
0 commit comments