Pass config and metadata of LocalQueryRunner to JoinCompiler
JoinCompiler will use metadata and config from LocalQueryRunner.
@@ -251,6 +251,7 @@ public class LocalQueryRunner
private final PageFunctionCompiler pageFunctionCompiler;
private final ExpressionCompiler expressionCompiler;
private final JoinFilterFunctionCompiler joinFilterFunctionCompiler;
+ private final JoinCompiler joinCompiler;
private final ConnectorManager connectorManager;
private final PluginManager pluginManager;
private final ImmutableMap<Class<? extends Statement>, DataDefinitionTask<?>> dataDefinitionTask;
@@ -309,7 +310,6 @@ public class LocalQueryRunner
this.nodeManager = new InMemoryNodeManager();
this.typeRegistry = new TypeRegistry();
this.pageSorter = new PagesIndexPageSorter(new PagesIndex.TestingFactory(false));
- this.pageIndexerFactory = new GroupByHashPageIndexerFactory(new JoinCompiler());
this.indexManager = new IndexManager();
NodeScheduler nodeScheduler = new NodeScheduler(
new LegacyNetworkTopology(),
@@ -335,6 +335,8 @@ public class LocalQueryRunner
new SchemaPropertyManager(),
new TablePropertyManager(),
transactionManager);
+ this.joinCompiler = new JoinCompiler(metadata, featuresConfig);
+ this.pageIndexerFactory = new GroupByHashPageIndexerFactory(joinCompiler);
this.statsCalculator = new SelectingStatsCalculator(
new CoefficientBasedStatsCalculator(metadata),
ServerMainModule.createNewStatsCalculator(metadata));
@@ -703,7 +705,7 @@ public class LocalQueryRunner
partitioningSpillerFactory,
blockEncodingManager,
new PagesIndex.TestingFactory(false),
- new JoinCompiler(),
+ joinCompiler,
new LookupJoinOperators());
// plan query
