Source:
<code>public ConnectorPageSource createPageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorSplit split, List<ColumnHandle> columns) { RaptorSplit raptorSplit = (RaptorSplit) split; OptionalInt bucketNumber = raptorSplit.getBucketNumber(); TupleDomain<RaptorColumnHandle> predicate = raptorSplit.getEffectivePredicate(); ReaderAttributes attributes = ReaderAttributes.from(session); OptionalLong transactionId = raptorSplit.getTransactionId(); Optional<Map<String, Type>> columnTypes = raptorSplit.getColumnTypes(); boolean deltaDeleteEnabled = raptorSplit.getDeltaDeleteEnabled(); Optional<Map<UUID, UUID>> shardDeltaMap = raptorSplit.getShardDeltaMap(); if (raptorSplit.getShardUuids().size() == 1) { UUID shardUuid = raptorSplit.getShardUuids().iterator().next(); return createPageSource(shardUuid, <START> shardDeltaMap.isPresent() && shardDeltaMap.get().get(shardUuid) != null ? Optional.of(shardDeltaMap.get().get(shardUuid)) : Optional.empty(), <END> deltaDeleteEnabled, bucketNumber, columns, predicate, attributes, transactionId, columnTypes); } Iterator<ConnectorPageSource> iterator = raptorSplit.getShardUuids().stream() .map(shardUuid -> createPageSource(shardUuid, shardDeltaMap.isPresent() && shardDeltaMap.get().get(shardUuid) != null ? Optional.of(shardDeltaMap.get().get(shardUuid)) : Optional.empty(), deltaDeleteEnabled, bucketNumber, columns, predicate, attributes, transactionId, columnTypes)) .iterator(); return new ConcatPageSource(iterator); }</code><technical_language>If removed Optional shardDeltaMap, this check simplified as: java return createPageSource(shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), deltaDeleteEnabled, bucketNumber, columns, predicate, attributes, transactionId, columnTypes); for one</technical_language>

Target:
public ConnectorPageSource createPageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorSplit split, List<ColumnHandle> columns) { RaptorSplit raptorSplit = (RaptorSplit) split; OptionalInt bucketNumber = raptorSplit.getBucketNumber(); TupleDomain<RaptorColumnHandle> predicate = raptorSplit.getEffectivePredicate(); ReaderAttributes attributes = ReaderAttributes.from(session); OptionalLong transactionId = raptorSplit.getTransactionId(); Optional<Map<String, Type>> columnTypes = raptorSplit.getColumnTypes(); boolean tableSupportsDeltaDelete = raptorSplit.isTableSupportsDeltaDelete(); FileSystemContext context = new FileSystemContext(session); Map<UUID, UUID> shardDeltaMap = raptorSplit.getShardDeltaMap(); if (raptorSplit.getShardUuids().size() == 1) { UUID shardUuid = raptorSplit.getShardUuids().iterator().next(); return createPageSource(context, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes); } Iterator<ConnectorPageSource> iterator = raptorSplit.getShardUuids().stream() .map(shardUuid -> createPageSource(context, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes)) .iterator(); return new ConcatPageSource(iterator); }