Skip to content

Commit

Permalink
Short circuit page source creation in Hive
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Oct 9, 2019
1 parent 4514c6f commit 4a362be
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.prestosql.spi.connector.ConnectorSplit;
import io.prestosql.spi.connector.ConnectorTableHandle;
import io.prestosql.spi.connector.ConnectorTransactionHandle;
import io.prestosql.spi.connector.FixedPageSource;
import io.prestosql.spi.connector.RecordCursor;
import io.prestosql.spi.connector.RecordPageSource;
import io.prestosql.spi.predicate.TupleDomain;
Expand Down Expand Up @@ -148,6 +149,10 @@ public static Optional<ConnectorPageSource> createHivePageSource(
Optional<BucketConversion> bucketConversion,
boolean s3SelectPushdownEnabled)
{
if (effectivePredicate.isNone()) {
return Optional.of(new FixedPageSource(ImmutableList.of()));
}

List<ColumnMapping> columnMappings = ColumnMapping.buildColumnMappings(
partitionKeys,
hiveColumns,
Expand Down

0 comments on commit 4a362be

Please sign in to comment.