Skip to content

Commit

Permalink
Define tables required by AbstractTestAggregations
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jan 10, 2024
1 parent abe48f9 commit 41687ef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import io.trino.testing.AbstractTestAggregations;
import io.trino.testing.QueryRunner;

import static io.trino.tpch.TpchTable.getTables;

public class TestHiveDistributedAggregations
extends AbstractTestAggregations
{
Expand All @@ -26,7 +24,7 @@ protected QueryRunner createQueryRunner()
throws Exception
{
return HiveQueryRunner.builder()
.setInitialTables(getTables())
.setInitialTables(REQUIRED_TPCH_TABLES)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import static io.trino.plugin.exchange.filesystem.containers.MinioStorage.getExchangeManagerProperties;
import static io.trino.testing.TestingNames.randomNameSuffix;
import static io.trino.tpch.TpchTable.getTables;
import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS;

@TestInstance(PER_CLASS)
Expand All @@ -49,7 +48,7 @@ protected QueryRunner createQueryRunner(Map<String, String> extraProperties)
runner.installPlugin(new FileSystemExchangePlugin());
runner.loadExchangeManager("filesystem", getExchangeManagerProperties(minioStorage));
})
.setInitialTables(getTables())
.setInitialTables(REQUIRED_TPCH_TABLES)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

import java.util.Map;

import static io.trino.tpch.TpchTable.getTables;

public class TestHiveRuntimeAdaptivePartitioningFaultTolerantExecutionAggregations
extends AbstractTestFaultTolerantExecutionAggregations
{
Expand All @@ -42,7 +40,7 @@ protected QueryRunner createQueryRunner(Map<String, String> extraProperties)
runner.loadExchangeManager("filesystem", ImmutableMap.of("exchange.base-directories",
System.getProperty("java.io.tmpdir") + "/trino-local-file-system-exchange-manager"));
})
.setInitialTables(getTables())
.setInitialTables(REQUIRED_TPCH_TABLES)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,35 @@
package io.trino.testing;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import io.trino.Session;
import io.trino.spi.type.TimeZoneKey;
import io.trino.tpch.TpchTable;
import org.intellij.lang.annotations.Language;
import org.junit.jupiter.api.Test;

import java.util.List;
import java.util.Set;

import static io.trino.SystemSessionProperties.MARK_DISTINCT_STRATEGY;
import static io.trino.testing.MaterializedResult.resultBuilder;
import static io.trino.testing.QueryAssertions.assertEqualsIgnoreOrder;
import static io.trino.tpch.TpchTable.LINE_ITEM;
import static io.trino.tpch.TpchTable.NATION;
import static io.trino.tpch.TpchTable.ORDERS;
import static io.trino.tpch.TpchTable.REGION;
import static org.assertj.core.api.Assertions.assertThat;

public abstract class AbstractTestAggregations
extends AbstractTestQueryFramework
{
protected static final Set<TpchTable<?>> REQUIRED_TPCH_TABLES = ImmutableSet.<TpchTable<?>>builder()
.add(LINE_ITEM)
.add(NATION)
.add(ORDERS)
.add(REGION)
.build();

@Test
public void testCountBoolean()
{
Expand Down

0 comments on commit 41687ef

Please sign in to comment.