@@ -585,7 +585,6 @@ impl TableMetadataBuilder {
585
585
if schema_found {
586
586
if self . last_added_schema_id != Some ( new_schema_id) {
587
587
self . changes . push ( TableUpdate :: AddSchema {
588
- last_column_id : Some ( self . metadata . last_column_id ) ,
589
588
schema : schema. clone ( ) ,
590
589
} ) ;
591
590
self . last_added_schema_id = Some ( new_schema_id) ;
@@ -609,10 +608,7 @@ impl TableMetadataBuilder {
609
608
. schemas
610
609
. insert ( new_schema_id, schema. clone ( ) . into ( ) ) ;
611
610
612
- self . changes . push ( TableUpdate :: AddSchema {
613
- schema,
614
- last_column_id : Some ( self . metadata . last_column_id ) ,
615
- } ) ;
611
+ self . changes . push ( TableUpdate :: AddSchema { schema } ) ;
616
612
617
613
self . last_added_schema_id = Some ( new_schema_id) ;
618
614
@@ -1453,10 +1449,7 @@ mod tests {
1453
1449
TableUpdate :: SetLocation {
1454
1450
location: TEST_LOCATION . to_string( )
1455
1451
} ,
1456
- TableUpdate :: AddSchema {
1457
- last_column_id: Some ( LAST_ASSIGNED_COLUMN_ID ) ,
1458
- schema: schema( ) ,
1459
- } ,
1452
+ TableUpdate :: AddSchema { schema: schema( ) } ,
1460
1453
TableUpdate :: SetCurrentSchema { schema_id: -1 } ,
1461
1454
TableUpdate :: AddSpec {
1462
1455
// Because this is a new tables, field-ids are assigned
@@ -1509,7 +1502,6 @@ mod tests {
1509
1502
location: TEST_LOCATION . to_string( )
1510
1503
} ,
1511
1504
TableUpdate :: AddSchema {
1512
- last_column_id: Some ( 0 ) ,
1513
1505
schema: Schema :: builder( ) . build( ) . unwrap( ) ,
1514
1506
} ,
1515
1507
TableUpdate :: SetCurrentSchema { schema_id: -1 } ,
@@ -1751,7 +1743,6 @@ mod tests {
1751
1743
Some ( & Arc :: new( added_schema. clone( ) ) )
1752
1744
) ;
1753
1745
pretty_assertions:: assert_eq!( build_result. changes[ 0 ] , TableUpdate :: AddSchema {
1754
- last_column_id: Some ( 4 ) ,
1755
1746
schema: added_schema
1756
1747
} ) ;
1757
1748
assert_eq ! ( build_result. changes[ 1 ] , TableUpdate :: SetCurrentSchema {
0 commit comments