2222 NotInExpr ,
2323 OrExpr ,
2424 QuantizationType ,
25+ QuantizationSearchWith ,
2526 RecommendStmt ,
2627 SelectStmt ,
2728 ScrollStmt ,
@@ -916,13 +917,6 @@ def test_with_acorn(self):
916917 assert node .with_clause is not None
917918 assert node .with_clause .acorn is True
918919
919- def test_with_multiple_params (self ):
920- node = parse (
921- "SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { hnsw_ef: 256, acorn: true }"
922- )
923- assert node .with_clause .hnsw_ef == 256
924- assert node .with_clause .acorn is True
925-
926920 def test_with_indexed_only (self ):
927921 node = parse ("SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { indexed_only: true }" )
928922 assert node .with_clause is not None
@@ -939,6 +933,13 @@ def test_with_quantization(self):
939933 assert node .with_clause .quantization .rescore is False
940934 assert node .with_clause .quantization .oversampling == pytest .approx (2.0 )
941935
936+ def test_with_multiple_params (self ):
937+ node = parse (
938+ "SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { hnsw_ef: 256, acorn: true }"
939+ )
940+ assert node .with_clause .hnsw_ef == 256
941+ assert node .with_clause .acorn is True
942+
942943 def test_with_mmr_params (self ):
943944 node = parse (
944945 "SEARCH col SIMILAR TO 'q' LIMIT 5 "
@@ -986,6 +987,10 @@ def test_with_mmr_candidates_non_positive_raises(self):
986987 with pytest .raises (QQLSyntaxError , match = "mmr_candidates must be a positive integer" ):
987988 parse ("SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { mmr_candidates: 0 }" )
988989
990+ def test_with_quantization_unknown_key_raises (self ):
991+ with pytest .raises (QQLSyntaxError ):
992+ parse ("SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { quantization: { unknown: true } }" )
993+
989994 def test_with_trailing_comma (self ):
990995 node = parse ("SEARCH col SIMILAR TO 'q' LIMIT 5 WITH { hnsw_ef: 256, }" )
991996 assert node .with_clause .hnsw_ef == 256
0 commit comments