@@ -1247,6 +1247,7 @@ static int vector_rebuild_quantization (sqlite3_context *context, const char *ta
12471247 rc = SQLITE_ERROR ;
12481248 goto vector_rebuild_quantization_cleanup ;
12491249 }
1250+
12501251 if (val < min_val ) min_val = val ;
12511252 if (val > max_val ) max_val = val ;
12521253 if (val < 0.0 ) contains_negative = true;
@@ -1425,7 +1426,7 @@ static int vector_quantize (sqlite3_context *context, const char *table_name, co
14251426 rc = sqlite3_exec (db , sql , NULL , NULL , NULL );
14261427 if (rc != SQLITE_OK ) goto quantize_cleanup ;
14271428
1428- vector_options options = vector_options_create ();
1429+ vector_options options = t_ctx -> options ; // t_ctx guarantees to exist
14291430 bool res = parse_keyvalue_string (context , arg_options , vector_keyvalue_callback , & options );
14301431 if (res == false) return SQLITE_ERROR ;
14311432
@@ -2273,15 +2274,6 @@ static int vStreamScanBestIndex (sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo
22732274 return SQLITE_OK ;
22742275}
22752276
2276- static int vStreamScanCursorOpen (sqlite3_vtab * pVtab , sqlite3_vtab_cursor * * ppCursor ) {
2277- int rc = vFullScanCursorOpen (pVtab , ppCursor );
2278- if (rc != SQLITE_OK ) return rc ;
2279-
2280- vFullScanCursor * c = (vFullScanCursor * )* ppCursor ;
2281- c -> is_streaming = true;
2282- return SQLITE_OK ;
2283- }
2284-
22852277static int vStreamScanCursorRun (sqlite3 * db , vFullScanCursor * c , const void * v1 , int v1size ) {
22862278 // duplicate input vector (to be later used by the Next callback)
22872279 void * v = sqlite_memdup (v1 , v1size );
0 commit comments