Source:
private Optional<InternalHiveSplit> createInternalHiveSplit( Path path, BlockLocation[] blockLocations, long start, long length, long fileSize, OptionalInt bucketNumber, boolean splittable) { String pathString = path.toString(); if (!pathMatchesPredicate(pathDomain, pathString)) { return Optional.empty(); } boolean forceLocalScheduling = this.forceLocalScheduling; if (fileSize == 0 && blockLocations.length == 0) { blockLocations = new BlockLocation[] {new BlockLocation()}; forceLocalScheduling = false; } ImmutableList.Builder<InternalHiveBlock> blockBuilder = ImmutableList.builder(); for (BlockLocation blockLocation : blockLocations) { long blockStart = Math.max(start, blockLocation.getOffset()); long blockEnd = Math.min(start + length, blockLocation.getOffset() + blockLocation.getLength()); if (blockStart > blockEnd) { continue; } if (blockStart == blockEnd && !(blockStart == start && blockEnd == start + length)) { continue; } blockBuilder.add(new InternalHiveBlock(blockStart, blockEnd, getHostAddresses(blockLocation))); } List<InternalHiveBlock> blocks = blockBuilder.build(); checkBlocks(blocks, start, length); if (!splittable) { blocks = ImmutableList.of(new InternalHiveBlock(start, start + length, blocks.get(0).getAddresses())); } return Optional.of(new InternalHiveSplit( partitionName, pathString, start, start + length, fileSize, schema, partitionKeys, blocks, bucketNumber, splittable, forceLocalScheduling && allBlocksHaveRealAddress(blocks), columnCoercions, bucketConversion, checkS3SelectPushdownBasedOnCompressionCodec(s3SelectPushdownEnabled, inputFormat, path))); }

Target:
private Optional<InternalHiveSplit> createInternalHiveSplit( Path path, BlockLocation[] blockLocations, long start, long length, long fileSize, OptionalInt bucketNumber, boolean splittable) { String pathString = path.toString(); if (!pathMatchesPredicate(pathDomain, pathString)) { return Optional.empty(); } boolean forceLocalScheduling = this.forceLocalScheduling; if (fileSize == 0 && blockLocations.length == 0) { blockLocations = new BlockLocation[] {new BlockLocation()}; forceLocalScheduling = false; } ImmutableList.Builder<InternalHiveBlock> blockBuilder = ImmutableList.builder(); for (BlockLocation blockLocation : blockLocations) { long blockStart = Math.max(start, blockLocation.getOffset()); long blockEnd = Math.min(start + length, blockLocation.getOffset() + blockLocation.getLength()); if (blockStart > blockEnd) { continue; } if (blockStart == blockEnd && !(blockStart == start && blockEnd == start + length)) { continue; } blockBuilder.add(new InternalHiveBlock(blockStart, blockEnd, getHostAddresses(blockLocation))); } List<InternalHiveBlock> blocks = blockBuilder.build(); checkBlocks(blocks, start, length); if (!splittable) { blocks = ImmutableList.of(new InternalHiveBlock(start, start + length, blocks.get(0).getAddresses())); } return Optional.of(new InternalHiveSplit( partitionName, pathString, start, start + length, fileSize, schema, partitionKeys, blocks, bucketNumber, splittable, forceLocalScheduling && allBlocksHaveRealAddress(blocks), columnCoercions, bucketConversion, s3SelectPushdownEnabled && S3SelectPushdown.isCompressionCodecSupported(inputFormat, path))); }