@@ -114,6 +114,8 @@ public class ValuesSourceReaderOperatorTests extends OperatorTestCase {
114114 { false , true , true },
115115 { false , false , true , true } };
116116
117+ static final double STORED_FIELDS_SEQUENTIAL_PROPORTIONS = 0.1 ;
118+
117119 private Directory directory = newDirectory ();
118120 private MapperService mapperService ;
119121 private IndexReader reader ;
@@ -147,7 +149,11 @@ static Operator.OperatorFactory factory(IndexReader reader, String name, Element
147149 fail ("unexpected shardIdx [" + shardIdx + "]" );
148150 }
149151 return loader ;
150- })), List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )), 0 );
152+ })),
153+ List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
154+ 0 ,
155+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
156+ );
151157 }
152158
153159 @ Override
@@ -444,7 +450,8 @@ public void testManySingleDocPages() {
444450 new ValuesSourceReaderOperator .Factory (
445451 List .of (testCase .info , fieldInfo (mapperService .fieldType ("key" ), ElementType .INT )),
446452 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
447- 0
453+ 0 ,
454+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
448455 ).get (driverContext )
449456 );
450457 List <Page > results = drive (operators , input .iterator (), driverContext );
@@ -550,7 +557,8 @@ private void loadSimpleAndAssert(
550557 new ValuesSourceReaderOperator .Factory (
551558 List .of (fieldInfo (mapperService .fieldType ("key" ), ElementType .INT )),
552559 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
553- 0
560+ 0 ,
561+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
554562 ).get (driverContext )
555563 );
556564 List <FieldCase > tests = new ArrayList <>();
@@ -562,7 +570,8 @@ private void loadSimpleAndAssert(
562570 new ValuesSourceReaderOperator .Factory (
563571 b .stream ().map (i -> i .info ).toList (),
564572 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
565- 0
573+ 0 ,
574+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
566575 ).get (driverContext )
567576 );
568577 }
@@ -652,7 +661,8 @@ private void testLoadAllStatus(boolean allInOnePage) {
652661 i -> new ValuesSourceReaderOperator .Factory (
653662 List .of (i .info ),
654663 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
655- 0
664+ 0 ,
665+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
656666 ).get (driverContext )
657667 )
658668 .toList ();
@@ -1418,7 +1428,8 @@ public void testNullsShared() {
14181428 new ValuesSourceReaderOperator .FieldInfo ("null2" , ElementType .NULL , shardIdx -> BlockLoader .CONSTANT_NULLS )
14191429 ),
14201430 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
1421- 0
1431+ 0 ,
1432+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
14221433 ).get (driverContext )
14231434 ),
14241435 new PageConsumerOperator (page -> {
@@ -1463,7 +1474,8 @@ private void testSequentialStoredFields(boolean sequential, int docCount) throws
14631474 fieldInfo (storedTextField ("stored_text" ), ElementType .BYTES_REF )
14641475 ),
14651476 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
1466- 0
1477+ 0 ,
1478+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
14671479 ).get (driverContext );
14681480 List <Page > results = drive (op , source .iterator (), driverContext );
14691481 Checks checks = new Checks (Block .MvOrdering .UNORDERED , Block .MvOrdering .UNORDERED );
@@ -1491,7 +1503,8 @@ public void testDescriptionOfMany() throws IOException {
14911503 ValuesSourceReaderOperator .Factory factory = new ValuesSourceReaderOperator .Factory (
14921504 cases .stream ().map (c -> c .info ).toList (),
14931505 List .of (new ValuesSourceReaderOperator .ShardContext (reader , () -> SourceLoader .FROM_STORED_SOURCE )),
1494- 0
1506+ 0 ,
1507+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
14951508 );
14961509 assertThat (factory .describe (), equalTo ("ValuesSourceReaderOperator[fields = [" + cases .size () + " fields]]" ));
14971510 try (Operator op = factory .get (driverContext ())) {
@@ -1535,7 +1548,8 @@ public void testManyShards() throws IOException {
15351548 return ft .blockLoader (blContext ());
15361549 })),
15371550 readerShardContexts ,
1538- 0
1551+ 0 ,
1552+ STORED_FIELDS_SEQUENTIAL_PROPORTIONS
15391553 );
15401554 DriverContext driverContext = driverContext ();
15411555 List <Page > results = drive (
0 commit comments