Source:
<code>private static ConnectorPageSource createSelectivePageSource( Set<HiveSelectivePageSourceFactory> selectivePageSourceFactories, Configuration configuration, ConnectorSession session, HiveSplit split, List<HiveColumnHandle> columns, DateTimeZone hiveStorageTimeZone) { Set<HiveColumnHandle> interimColumns = ImmutableSet.<HiveColumnHandle>builder() .addAll(split.getPredicateColumns().values()) .addAll(split.getBucketConversion().map(BucketConversion::getBucketColumnHandles).orElse(ImmutableList.of())) .build(); Path path = new Path(split.getPath()); List<ColumnMapping> columnMappings = ColumnMapping.buildColumnMappings( split.getPartitionKeys(), columns, ImmutableList.copyOf(interimColumns), split.getColumnCoercions(), path, split.getTableBucketNumber()); Optional<BucketAdaptation> bucketAdaptation = split.getBucketConversion().map(conversion -> toBucketAdaptation(conversion, columnMappings, split.getTableBucketNumber())); checkArgument(!bucketAdaptation.isPresent(), "Bucket conversion is not supported yet"); checkArgument(TRUE_CONSTANT.equals(split.getRemainingPredicate()), "Complex predicate pushdown is not supported yet"); Map<Integer, String> prefilledValues = columnMappings.stream() .filter(mapping -> mapping.getKind() == ColumnMappingKind.PREFILLED) .collect(toImmutableMap(mapping -> mapping.getHiveColumnHandle().getHiveColumnIndex(), ColumnMapping::getPrefilledValue)); List<Integer> outputColumns = columns.stream() .map(HiveColumnHandle::getHiveColumnIndex) .collect(toImmutableList()); for (HiveSelectivePageSourceFactory pageSourceFactory : selectivePageSourceFactories) { Optional<? extends ConnectorPageSource> pageSource = pageSourceFactory.createPageSource( configuration, session, path, split.getStart(), split.getLength(), split.getFileSize(), split.getSchema(), toColumnHandles(columnMappings, true), prefilledValues, outputColumns, split.getDomainPredicate(), hiveStorageTimeZone); if (pageSource.isPresent()) { return pageSource.get(); } } <START> throw new RuntimeException("Could not find a file reader for split " + split); <END> }</code><technical_language>this is IllegalStateException</technical_language>

Target:
private static ConnectorPageSource createSelectivePageSource( Set<HiveSelectivePageSourceFactory> selectivePageSourceFactories, Configuration configuration, ConnectorSession session, HiveSplit split, List<HiveColumnHandle> columns, DateTimeZone hiveStorageTimeZone) { Set<HiveColumnHandle> interimColumns = ImmutableSet.<HiveColumnHandle>builder() .addAll(split.getPredicateColumns().values()) .addAll(split.getBucketConversion().map(BucketConversion::getBucketColumnHandles).orElse(ImmutableList.of())) .build(); Path path = new Path(split.getPath()); List<ColumnMapping> columnMappings = ColumnMapping.buildColumnMappings( split.getPartitionKeys(), columns, ImmutableList.copyOf(interimColumns), split.getColumnCoercions(), path, split.getTableBucketNumber()); Optional<BucketAdaptation> bucketAdaptation = split.getBucketConversion().map(conversion -> toBucketAdaptation(conversion, columnMappings, split.getTableBucketNumber())); checkArgument(!bucketAdaptation.isPresent(), "Bucket conversion is not supported yet"); checkArgument(TRUE_CONSTANT.equals(split.getRemainingPredicate()), "Complex predicate pushdown is not supported yet"); Map<Integer, String> prefilledValues = columnMappings.stream() .filter(mapping -> mapping.getKind() == ColumnMappingKind.PREFILLED) .collect(toImmutableMap(mapping -> mapping.getHiveColumnHandle().getHiveColumnIndex(), ColumnMapping::getPrefilledValue)); List<Integer> outputColumns = columns.stream() .map(HiveColumnHandle::getHiveColumnIndex) .collect(toImmutableList()); for (HiveSelectivePageSourceFactory pageSourceFactory : selectivePageSourceFactories) { Optional<? extends ConnectorPageSource> pageSource = pageSourceFactory.createPageSource( configuration, session, path, split.getStart(), split.getLength(), split.getFileSize(), split.getSchema(), toColumnHandles(columnMappings, true), prefilledValues, outputColumns, split.getDomainPredicate(), hiveStorageTimeZone); if (pageSource.isPresent()) { return pageSource.get(); } } throw new IllegalStateException("Could not find a file reader for split " + split); }