@@ -108,7 +108,14 @@ fn calc_inline_constraints_from_columns(columns: &[ColumnDef]) -> Vec<TableConst
108108 for ast:: ColumnOptionDef { name, option } in & column. options {
109109 match option {
110110 ast:: ColumnOption :: Unique ( UniqueConstraint {
111- characteristics, ..
111+ characteristics,
112+ name,
113+ index_name : _index_name,
114+ index_type_display : _index_type_display,
115+ index_type : _index_type,
116+ columns : _column,
117+ index_options : _index_options,
118+ nulls_distinct : _nulls_distinct,
112119 } ) => constraints. push ( TableConstraint :: Unique ( UniqueConstraint {
113120 name : name. clone ( ) ,
114121 index_name : None ,
@@ -131,7 +138,11 @@ fn calc_inline_constraints_from_columns(columns: &[ColumnDef]) -> Vec<TableConst
131138 } ) ) ,
132139 ast:: ColumnOption :: PrimaryKey ( PrimaryKeyConstraint {
133140 characteristics,
134- ..
141+ name : _name,
142+ index_name : _index_name,
143+ index_type : _index_type,
144+ columns : _columns,
145+ index_options : _index_options,
135146 } ) => {
136147 constraints. push ( TableConstraint :: PrimaryKey ( PrimaryKeyConstraint {
137148 name : name. clone ( ) ,
@@ -158,27 +169,32 @@ fn calc_inline_constraints_from_columns(columns: &[ColumnDef]) -> Vec<TableConst
158169 on_delete,
159170 on_update,
160171 characteristics,
161- ..
172+ name : _name,
173+ index_name : _index_name,
174+ columns : _columns,
175+ match_kind : _match_kind,
162176 } ) => {
163177 constraints. push ( TableConstraint :: ForeignKey ( ForeignKeyConstraint {
164178 name : name. clone ( ) ,
165179 index_name : None ,
166180 columns : vec ! [ ] ,
167181 foreign_table : foreign_table. clone ( ) ,
168182 referred_columns : referred_columns. clone ( ) ,
169- on_delete : on_delete. clone ( ) ,
170- on_update : on_update. clone ( ) ,
183+ on_delete : * on_delete,
184+ on_update : * on_update,
171185 match_kind : None ,
172186 characteristics : * characteristics,
173187 } ) )
174188 }
175- ast:: ColumnOption :: Check ( CheckConstraint { name, expr, .. } ) => {
176- constraints. push ( TableConstraint :: Check ( CheckConstraint {
177- name : name. clone ( ) ,
178- expr : expr. clone ( ) ,
179- enforced : None ,
180- } ) )
181- }
189+ ast:: ColumnOption :: Check ( CheckConstraint {
190+ name,
191+ expr,
192+ enforced : _enforced,
193+ } ) => constraints. push ( TableConstraint :: Check ( CheckConstraint {
194+ name : name. clone ( ) ,
195+ expr : expr. clone ( ) ,
196+ enforced : None ,
197+ } ) ) ,
182198 ast:: ColumnOption :: Default ( _)
183199 | ast:: ColumnOption :: Null
184200 | ast:: ColumnOption :: NotNull
@@ -1042,7 +1058,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
10421058 returning,
10431059 or,
10441060 limit,
1045- ..
1061+ update_token : _ ,
10461062 } ) => {
10471063 let from_clauses =
10481064 from. map ( |update_table_from_kind| match update_table_from_kind {
@@ -1074,7 +1090,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
10741090 from,
10751091 order_by,
10761092 limit,
1077- ..
1093+ delete_token : _ ,
10781094 } ) => {
10791095 if !tables. is_empty ( ) {
10801096 plan_err ! ( "DELETE <TABLE> not supported" ) ?;
@@ -1350,18 +1366,22 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
13501366
13511367 Ok ( LogicalPlan :: Ddl ( statement) )
13521368 }
1353- Statement :: DropFunction ( func) => {
1369+ Statement :: DropFunction ( ast:: DropFunction {
1370+ if_exists,
1371+ func_desc,
1372+ drop_behavior : _,
1373+ } ) => {
13541374 // According to postgresql documentation it can be only one function
13551375 // specified in drop statement
1356- if let Some ( desc) = func . func_desc . first ( ) {
1376+ if let Some ( desc) = func_desc. first ( ) {
13571377 // At the moment functions can't be qualified `schema.name`
13581378 let name = match & desc. name . 0 [ ..] {
13591379 [ ] => exec_err ! ( "Function should have name" ) ?,
13601380 [ n] => n. as_ident ( ) . unwrap ( ) . value . clone ( ) ,
13611381 [ ..] => not_impl_err ! ( "Qualified functions are not supported" ) ?,
13621382 } ;
13631383 let statement = DdlStatement :: DropFunction ( DropFunction {
1364- if_exists : func . if_exists ,
1384+ if_exists,
13651385 name,
13661386 schema : DFSchemaRef :: new ( DFSchema :: empty ( ) ) ,
13671387 } ) ;
0 commit comments