@@ -270,8 +270,8 @@ fn test_snowflake_create_table_with_tag() {
270
270
assert_eq ! ( "my_table" , name. to_string( ) ) ;
271
271
assert_eq ! (
272
272
Some ( vec![
273
- Tag :: new( "A" . into ( ) , "TAG A" . to_string( ) ) ,
274
- Tag :: new( "B" . into ( ) , "TAG B" . to_string( ) )
273
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "A" ) ] ) , "TAG A" . to_string( ) ) ,
274
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "B" ) ] ) , "TAG B" . to_string( ) )
275
275
] ) ,
276
276
with_tags
277
277
) ;
@@ -291,8 +291,8 @@ fn test_snowflake_create_table_with_tag() {
291
291
assert_eq ! ( "my_table" , name. to_string( ) ) ;
292
292
assert_eq ! (
293
293
Some ( vec![
294
- Tag :: new( "A" . into ( ) , "TAG A" . to_string( ) ) ,
295
- Tag :: new( "B" . into ( ) , "TAG B" . to_string( ) )
294
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "A" ) ] ) , "TAG A" . to_string( ) ) ,
295
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "B" ) ] ) , "TAG B" . to_string( ) )
296
296
] ) ,
297
297
with_tags
298
298
) ;
@@ -731,7 +731,7 @@ fn test_snowflake_create_table_with_columns_masking_policy() {
731
731
option: ColumnOption :: Policy ( ColumnPolicy :: MaskingPolicy (
732
732
ColumnPolicyProperty {
733
733
with,
734
- policy_name: "p" . into ( ) ,
734
+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p" ) ] ) ,
735
735
using_columns,
736
736
}
737
737
) )
@@ -765,7 +765,7 @@ fn test_snowflake_create_table_with_columns_projection_policy() {
765
765
option: ColumnOption :: Policy ( ColumnPolicy :: ProjectionPolicy (
766
766
ColumnPolicyProperty {
767
767
with,
768
- policy_name: "p" . into ( ) ,
768
+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p" ) ] ) ,
769
769
using_columns: None ,
770
770
}
771
771
) )
@@ -802,8 +802,14 @@ fn test_snowflake_create_table_with_columns_tags() {
802
802
option: ColumnOption :: Tags ( TagsColumnOption {
803
803
with,
804
804
tags: vec![
805
- Tag :: new( "A" . into( ) , "TAG A" . into( ) ) ,
806
- Tag :: new( "B" . into( ) , "TAG B" . into( ) ) ,
805
+ Tag :: new(
806
+ ObjectName :: from( vec![ Ident :: new( "A" ) ] ) ,
807
+ "TAG A" . into( )
808
+ ) ,
809
+ Tag :: new(
810
+ ObjectName :: from( vec![ Ident :: new( "B" ) ] ) ,
811
+ "TAG B" . into( )
812
+ ) ,
807
813
]
808
814
} ) ,
809
815
} ] ,
@@ -846,7 +852,7 @@ fn test_snowflake_create_table_with_several_column_options() {
846
852
option: ColumnOption :: Policy ( ColumnPolicy :: MaskingPolicy (
847
853
ColumnPolicyProperty {
848
854
with: true ,
849
- policy_name: "p1" . into ( ) ,
855
+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p1" ) ] ) ,
850
856
using_columns: Some ( vec![ "a" . into( ) , "b" . into( ) ] ) ,
851
857
}
852
858
) ) ,
@@ -856,8 +862,14 @@ fn test_snowflake_create_table_with_several_column_options() {
856
862
option: ColumnOption :: Tags ( TagsColumnOption {
857
863
with: true ,
858
864
tags: vec![
859
- Tag :: new( "A" . into( ) , "TAG A" . into( ) ) ,
860
- Tag :: new( "B" . into( ) , "TAG B" . into( ) ) ,
865
+ Tag :: new(
866
+ ObjectName :: from( vec![ Ident :: new( "A" ) ] ) ,
867
+ "TAG A" . into( )
868
+ ) ,
869
+ Tag :: new(
870
+ ObjectName :: from( vec![ Ident :: new( "B" ) ] ) ,
871
+ "TAG B" . into( )
872
+ ) ,
861
873
]
862
874
} ) ,
863
875
}
@@ -878,7 +890,7 @@ fn test_snowflake_create_table_with_several_column_options() {
878
890
option: ColumnOption :: Policy ( ColumnPolicy :: ProjectionPolicy (
879
891
ColumnPolicyProperty {
880
892
with: false ,
881
- policy_name: "p2" . into ( ) ,
893
+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p2" ) ] ) ,
882
894
using_columns: None ,
883
895
}
884
896
) ) ,
@@ -888,8 +900,14 @@ fn test_snowflake_create_table_with_several_column_options() {
888
900
option: ColumnOption :: Tags ( TagsColumnOption {
889
901
with: false ,
890
902
tags: vec![
891
- Tag :: new( "C" . into( ) , "TAG C" . into( ) ) ,
892
- Tag :: new( "D" . into( ) , "TAG D" . into( ) ) ,
903
+ Tag :: new(
904
+ ObjectName :: from( vec![ Ident :: new( "C" ) ] ) ,
905
+ "TAG C" . into( )
906
+ ) ,
907
+ Tag :: new(
908
+ ObjectName :: from( vec![ Ident :: new( "D" ) ] ) ,
909
+ "TAG D" . into( )
910
+ ) ,
893
911
]
894
912
} ) ,
895
913
}
@@ -942,8 +960,8 @@ fn test_snowflake_create_iceberg_table_all_options() {
942
960
with_aggregation_policy. map( |name| name. to_string( ) )
943
961
) ;
944
962
assert_eq ! ( Some ( vec![
945
- Tag :: new( "A" . into ( ) , "TAG A" . into( ) ) ,
946
- Tag :: new( "B" . into ( ) , "TAG B" . into( ) ) ,
963
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "A" ) ] ) , "TAG A" . into( ) ) ,
964
+ Tag :: new( ObjectName :: from ( vec! [ Ident :: new ( "B" ) ] ) , "TAG B" . into( ) ) ,
947
965
] ) , with_tags) ;
948
966
949
967
}
@@ -4172,3 +4190,17 @@ fn test_snowflake_create_view_with_multiple_column_options() {
4172
4190
r#"CREATE VIEW X (COL WITH TAG (pii='email') COMMENT 'foobar') AS SELECT * FROM Y"# ;
4173
4191
snowflake ( ) . verified_stmt ( create_view_with_tag) ;
4174
4192
}
4193
+
4194
+ #[ test]
4195
+ fn test_snowflake_create_view_with_composite_tag ( ) {
4196
+ let create_view_with_tag =
4197
+ r#"CREATE VIEW X (COL WITH TAG (foo.bar.baz.pii='email')) AS SELECT * FROM Y"# ;
4198
+ snowflake ( ) . verified_stmt ( create_view_with_tag) ;
4199
+ }
4200
+
4201
+ #[ test]
4202
+ fn test_snowflake_create_view_with_composite_policy_name ( ) {
4203
+ let create_view_with_tag =
4204
+ r#"CREATE VIEW X (COL WITH MASKING POLICY foo.bar.baz) AS SELECT * FROM Y"# ;
4205
+ snowflake ( ) . verified_stmt ( create_view_with_tag) ;
4206
+ }
0 commit comments