File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1651,7 +1651,7 @@ pub struct ColumnPolicyProperty {
16511651 /// ```
16521652 /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
16531653 pub with : bool ,
1654- pub policy_name : Ident ,
1654+ pub policy_name : ObjectName ,
16551655 pub using_columns : Option < Vec < Ident > > ,
16561656}
16571657
Original file line number Diff line number Diff line change @@ -1177,7 +1177,7 @@ fn parse_column_policy_property(
11771177 parser : & mut Parser ,
11781178 with : bool ,
11791179) -> Result < ColumnPolicyProperty , ParserError > {
1180- let policy_name = parser. parse_identifier ( ) ?;
1180+ let policy_name = parser. parse_object_name ( false ) ?;
11811181 let using_columns = if parser. parse_keyword ( Keyword :: USING ) {
11821182 parser. expect_token ( & Token :: LParen ) ?;
11831183 let columns = parser. parse_comma_separated ( |p| p. parse_identifier ( ) ) ?;
Original file line number Diff line number Diff line change @@ -731,7 +731,7 @@ fn test_snowflake_create_table_with_columns_masking_policy() {
731731 option: ColumnOption :: Policy ( ColumnPolicy :: MaskingPolicy (
732732 ColumnPolicyProperty {
733733 with,
734- policy_name: "p" . into ( ) ,
734+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p" ) ] ) ,
735735 using_columns,
736736 }
737737 ) )
@@ -765,7 +765,7 @@ fn test_snowflake_create_table_with_columns_projection_policy() {
765765 option: ColumnOption :: Policy ( ColumnPolicy :: ProjectionPolicy (
766766 ColumnPolicyProperty {
767767 with,
768- policy_name: "p" . into ( ) ,
768+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p" ) ] ) ,
769769 using_columns: None ,
770770 }
771771 ) )
@@ -852,7 +852,7 @@ fn test_snowflake_create_table_with_several_column_options() {
852852 option: ColumnOption :: Policy ( ColumnPolicy :: MaskingPolicy (
853853 ColumnPolicyProperty {
854854 with: true ,
855- policy_name: "p1" . into ( ) ,
855+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p1" ) ] ) ,
856856 using_columns: Some ( vec![ "a" . into( ) , "b" . into( ) ] ) ,
857857 }
858858 ) ) ,
@@ -890,7 +890,7 @@ fn test_snowflake_create_table_with_several_column_options() {
890890 option: ColumnOption :: Policy ( ColumnPolicy :: ProjectionPolicy (
891891 ColumnPolicyProperty {
892892 with: false ,
893- policy_name: "p2" . into ( ) ,
893+ policy_name: ObjectName :: from ( vec! [ Ident :: new ( "p2" ) ] ) ,
894894 using_columns: None ,
895895 }
896896 ) ) ,
You can’t perform that action at this time.
0 commit comments