Skip to content

Commit

Permalink
Respect allow_pushdown_into_connectors in split and page sources
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Oct 22, 2021
1 parent 2e60184 commit ad86637
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors;
import static java.util.Objects.requireNonNull;

public class PageSourceManager
Expand Down Expand Up @@ -61,6 +62,9 @@ public ConnectorPageSource createPageSource(Session session, Split split, TableH
if (constraint.isNone()) {
return new EmptyPageSource();
}
if (!isAllowPushdownIntoConnectors(session)) {
dynamicFilter = DynamicFilter.EMPTY;
}
return provider.createPageSource(
table.getTransaction(),
session.toConnectorSession(catalogName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static io.trino.SystemSessionProperties.isAllowPushdownIntoConnectors;
import static java.util.Objects.requireNonNull;

public class SplitManager
Expand Down Expand Up @@ -69,6 +70,9 @@ public SplitSource getSplits(Session session, TableHandle table, SplitScheduling
{
CatalogName catalogName = table.getCatalogName();
ConnectorSplitManager splitManager = getConnectorSplitManager(catalogName);
if (!isAllowPushdownIntoConnectors(session)) {
dynamicFilter = DynamicFilter.EMPTY;
}

ConnectorSession connectorSession = session.toConnectorSession(catalogName);

Expand Down

0 comments on commit ad86637

Please sign in to comment.