Skip to content

Commit

Permalink
Remove overrides of BaseFailureRecoveryTest#enableDynamicFiltering
Browse files Browse the repository at this point in the history
  • Loading branch information
raunaqmorarka authored and losipiuk committed May 26, 2022
1 parent 46a36ad commit a6e9401
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,4 @@ public void testDeletePartitionWithSubquery()
Optional.of("DROP TABLE <table>"));
}).hasMessageContaining("Deletes must match whole partitions for non-transactional tables");
}

@Override
protected Session enableDynamicFiltering(boolean enabled)
{
Session session = super.enableDynamicFiltering(enabled);
return Session.builder(session)
// Ensure probe side scan wait until DF is collected
.setCatalogSessionProperty(session.getCatalog().orElseThrow(), "dynamic_filtering_wait_timeout", "1h")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
package io.trino.plugin.iceberg;

import io.trino.Session;
import io.trino.operator.RetryPolicy;
import io.trino.spi.ErrorType;
import io.trino.testing.BaseFailureRecoveryTest;
Expand Down Expand Up @@ -258,14 +257,4 @@ public void testInsertIntoExistingPartition()
"INSERT INTO <table> SELECT *, 'partition1' p FROM orders",
Optional.of("DROP TABLE <table>"));
}

@Override
protected Session enableDynamicFiltering(boolean enabled)
{
Session session = super.enableDynamicFiltering(enabled);
return Session.builder(session)
// Ensure probe side scan wait until DF is collected
.setCatalogSessionProperty(session.getCatalog().orElseThrow(), "dynamic_filtering_wait_timeout", "1h")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -814,13 +814,15 @@ private static StageStats getRootStage(MaterializedResult result)
return requireNonNull(statementStats.getRootStage(), "root stage is null");
}

protected Session enableDynamicFiltering(boolean enabled)
private Session enableDynamicFiltering(boolean enabled)
{
Session defaultSession = getQueryRunner().getDefaultSession();
return Session.builder(defaultSession)
.setSystemProperty(ENABLE_DYNAMIC_FILTERING, Boolean.toString(enabled))
.setSystemProperty(JOIN_REORDERING_STRATEGY, NONE.name())
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, PARTITIONED.name())
// Ensure probe side scan wait until DF is collected
.setCatalogSessionProperty(defaultSession.getCatalog().orElseThrow(), "dynamic_filtering_wait_timeout", "1h")
.build();
}
}

0 comments on commit a6e9401

Please sign in to comment.