@@ -112,14 +112,14 @@ impl SpannSegmentWriter {
112112 return Err ( SpannSegmentWriterError :: InvalidArgument ) ;
113113 }
114114
115- let reconciled_schema = Schema :: reconcile_schema_and_config (
116- collection . schema . as_ref ( ) ,
117- Some ( & collection . config ) ,
118- KnnIndex :: Spann ,
119- )
120- . map_err ( SpannSegmentWriterError :: InvalidSchema ) ? ;
115+ let schema = if let Some ( schema ) = collection . schema . as_ref ( ) {
116+ schema. clone ( )
117+ } else {
118+ Schema :: convert_collection_config_to_schema ( & collection . config , KnnIndex :: Spann )
119+ . map_err ( SpannSegmentWriterError :: InvalidSchema ) ?
120+ } ;
121121
122- let params = reconciled_schema
122+ let params = schema
123123 . get_internal_spann_config ( )
124124 . ok_or ( SpannSegmentWriterError :: MissingSpannConfiguration ) ?;
125125
@@ -690,8 +690,8 @@ mod test {
690690 ..Default :: default ( )
691691 } ;
692692 collection. schema = Some (
693- Schema :: reconcile_schema_and_config ( None , Some ( & collection. config ) , KnnIndex :: Spann )
694- . expect ( "Error reconciling schema for test collection" ) ,
693+ Schema :: convert_collection_config_to_schema ( & collection. config , KnnIndex :: Spann )
694+ . expect ( "Error converting config to schema for test collection" ) ,
695695 ) ;
696696
697697 let pl_block_size = 5 * 1024 * 1024 ;
@@ -927,8 +927,8 @@ mod test {
927927 ..Default :: default ( )
928928 } ;
929929 collection. schema = Some (
930- Schema :: reconcile_schema_and_config ( None , Some ( & collection. config ) , KnnIndex :: Spann )
931- . expect ( "Error reconciling schema for test collection" ) ,
930+ Schema :: convert_collection_config_to_schema ( & collection. config , KnnIndex :: Spann )
931+ . expect ( "Error converting config to schema for test collection" ) ,
932932 ) ;
933933
934934 let pl_block_size = 5 * 1024 * 1024 ;
@@ -1089,8 +1089,8 @@ mod test {
10891089 ..Default :: default ( )
10901090 } ;
10911091 collection. schema = Some (
1092- Schema :: reconcile_schema_and_config ( None , Some ( & collection. config ) , KnnIndex :: Spann )
1093- . expect ( "Error reconciling schema for test collection" ) ,
1092+ Schema :: convert_collection_config_to_schema ( & collection. config , KnnIndex :: Spann )
1093+ . expect ( "Error converting config to schema for test collection" ) ,
10941094 ) ;
10951095
10961096 let segment_id = SegmentUuid :: new ( ) ;
@@ -1220,8 +1220,8 @@ mod test {
12201220 ..Default :: default ( )
12211221 } ;
12221222 collection. schema = Some (
1223- Schema :: reconcile_schema_and_config ( None , Some ( & collection. config ) , KnnIndex :: Spann )
1224- . expect ( "Error reconciling schema for test collection" ) ,
1223+ Schema :: convert_collection_config_to_schema ( & collection. config , KnnIndex :: Spann )
1224+ . expect ( "Error converting config to schema for test collection" ) ,
12251225 ) ;
12261226
12271227 let pl_block_size = 5 * 1024 * 1024 ;
0 commit comments