File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
core/src/main/java/com/scalar/db/transaction/consensuscommit Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1818import com .scalar .db .api .Result ;
1919import com .scalar .db .api .Scan ;
2020import com .scalar .db .api .ScanAll ;
21- import com .scalar .db .api .ScanBuilder ;
2221import com .scalar .db .api .ScanWithIndex ;
2322import com .scalar .db .api .Scanner ;
2423import com .scalar .db .api .Selection .Conjunction ;
@@ -596,16 +595,14 @@ private void validateScanResults(
596595 Scanner scanner = null ;
597596 try {
598597 // Only get tx_id and primary key columns because we use only them to compare
599- ScanBuilder .BuildableScanOrScanAllFromExisting builder =
600- Scan .newBuilder (scan ).clearProjections ().projection (Attribute .ID );
601598 TableMetadata tableMetadata = getTableMetadata (scan );
602- for ( String partitionKeyName : tableMetadata . getPartitionKeyNames ()) {
603- builder = builder . projection ( partitionKeyName );
604- }
605- for ( String clusteringKeyName : tableMetadata . getClusteringKeyNames ()) {
606- builder = builder . projection ( clusteringKeyName );
607- }
608- scan = builder .build ();
599+ scan =
600+ Scan . newBuilder ( scan )
601+ . clearProjections ()
602+ . projection ( Attribute . ID )
603+ . projections ( tableMetadata . getPartitionKeyNames ())
604+ . projections ( tableMetadata . getClusteringKeyNames ())
605+ .build ();
609606
610607 if (scan .getLimit () == 0 ) {
611608 scanner = storage .scan (scan );
You can’t perform that action at this time.
0 commit comments