@@ -483,8 +483,7 @@ public UniKeysExtractor<Right_> buildRightKeysExtractor() {
483483 }
484484
485485 public <T > Indexer <T > buildIndexer (boolean isLeftBridge ) {
486- Supplier <Indexer <T >> backendSupplier =
487- requiresRandomAccess ? RandomAccessLeafIndexer ::new : LinkedListLeafIndexer ::new ;
486+ Supplier <Indexer <T >> backendSupplier = RandomAccessLeafIndexer ::new ;
488487 if (!hasJoiners ()) { // NoneJoiner results in a bare backend (NoneIndexer).
489488 return backendSupplier .get ();
490489 }
@@ -517,8 +516,7 @@ private <T> Supplier<Indexer<T>> buildIndexerChain(boolean isLeftBridge, int fro
517516 // Leaf-most level whose index key equals the whole composite key: no KeyUnpacker indirection.
518517 if (joinerType == JoinerType .EQUAL ) {
519518 // Fuse the leaf-most equal indexer with its backend.
520- downstreamIndexerSupplier = () -> new EqualIndexer <>(KeyUnpacker .single (),
521- requiresRandomAccess ? RandomAccessLeafIndexer ::new : LinkedListLeafIndexer ::new );
519+ downstreamIndexerSupplier = () -> new EqualIndexer <>(KeyUnpacker .single (), RandomAccessLeafIndexer ::new );
522520 } else {
523521 KeyUnpacker <?> keyUnpacker = KeyUnpacker .single ();
524522 downstreamIndexerSupplier = () -> buildIndexerPart (isLeftBridge , joinerType , keyUnpacker , backendSupplier );
@@ -561,11 +559,12 @@ public <L, R> FusedEqualIndex<L, R> buildFusedEqualIndex() {
561559 equalPrefixLength == joinerCount ? KeyUnpacker .single () : KeyUnpacker .composite (0 );
562560 if (equalPrefixLength == joinerCount ) {
563561 // Pure equal: the per-side downstream is just the tuple list; the bucket is the equal-key group.
564- return new FusedEqualIndex <>(topEqualKeyUnpacker , false , LinkedListLeafIndexer ::new , LinkedListLeafIndexer ::new );
562+ return new FusedEqualIndex <>(topEqualKeyUnpacker , false , RandomAccessLeafIndexer ::new ,
563+ RandomAccessLeafIndexer ::new );
565564 } else {
566565 // Equal prefix + suffix: build the per-side suffix sub-chain (the right side flips comparisons).
567- var leftDownstreamSupplier = this .<L > buildIndexerChain (true , 1 , LinkedListLeafIndexer ::new );
568- var rightDownstreamSupplier = this .<R > buildIndexerChain (false , 1 , LinkedListLeafIndexer ::new );
566+ var leftDownstreamSupplier = this .<L > buildIndexerChain (true , 1 , RandomAccessLeafIndexer ::new );
567+ var rightDownstreamSupplier = this .<R > buildIndexerChain (false , 1 , RandomAccessLeafIndexer ::new );
569568 return new FusedEqualIndex <>(topEqualKeyUnpacker , true , leftDownstreamSupplier , rightDownstreamSupplier );
570569 }
571570 }
0 commit comments