Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static class Builder
extends DistributedQueryRunner.Builder<Builder>
{
private List<TpchTable<?>> initialTables = ImmutableList.of();
private ImmutableMap.Builder<String, String> memoryProperties = ImmutableMap.builder();

protected Builder()
{
Expand All @@ -68,6 +69,19 @@ public Builder setInitialTables(Iterable<TpchTable<?>> initialTables)
return self();
}

public Builder setMemoryProperties(Map<String, String> memoryProperties)
{
this.memoryProperties = ImmutableMap.<String, String>builder()
.putAll(requireNonNull(memoryProperties, "memoryProperties is null"));
return self();
}

public Builder addMemoryProperty(String key, String value)
{
this.memoryProperties.put(key, value);
return self();
}

@Override
public DistributedQueryRunner build()
throws Exception
Expand All @@ -76,7 +90,7 @@ public DistributedQueryRunner build()

try {
queryRunner.installPlugin(new MemoryPlugin());
queryRunner.createCatalog(CATALOG, "memory", ImmutableMap.of());
queryRunner.createCatalog(CATALOG, "memory", memoryProperties.buildOrThrow());

queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch", ImmutableMap.of());
Expand Down