Skip to content
Merged
Show file tree
Hide file tree
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 @@ -35,7 +35,6 @@
import static io.trino.testing.QueryAssertions.assertContains;
import static io.trino.testing.StatefulSleepingSum.STATEFUL_SLEEPING_SUM;
import static io.trino.testing.assertions.Assert.assertEventually;
import static io.trino.tpch.TpchTable.CUSTOMER;
import static io.trino.tpch.TpchTable.NATION;
import static io.trino.tpch.TpchTable.ORDERS;
import static io.trino.tpch.TpchTable.REGION;
Expand All @@ -49,7 +48,7 @@
public abstract class AbstractTestQueries
extends AbstractTestQueryFramework
{
protected static final List<TpchTable<?>> REQUIRED_TPCH_TABLES = ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION);
protected static final List<TpchTable<?>> REQUIRED_TPCH_TABLES = ImmutableList.of(NATION, ORDERS, REGION);

// We can just use the default type registry, since we don't use any parametric types
protected static final FunctionBundle CUSTOM_FUNCTIONS = InternalFunctionBundle.builder()
Expand Down Expand Up @@ -364,8 +363,8 @@ public void testInformationSchemaFiltering()
"SELECT table_name FROM information_schema.tables WHERE table_name = 'orders' LIMIT 1",
"SELECT 'orders' table_name");
assertQuery(
"SELECT table_name FROM information_schema.columns WHERE data_type = 'bigint' AND table_name = 'customer' and column_name = 'custkey' LIMIT 1",
"SELECT 'customer' table_name");
"SELECT table_name FROM information_schema.columns WHERE data_type = 'bigint' AND table_name = 'nation' and column_name = 'nationkey' LIMIT 1",
"SELECT 'nation' table_name");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import io.trino.sql.planner.plan.TableScanNode;
import io.trino.testing.sql.TestTable;
import io.trino.testing.sql.TestView;
import io.trino.tpch.TpchTable;
import org.intellij.lang.annotations.Language;
import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -155,6 +156,7 @@
import static io.trino.testing.TestingNames.randomNameSuffix;
import static io.trino.testing.assertions.Assert.assertEventually;
import static io.trino.testing.assertions.TestUtil.verifyResultOrFailure;
import static io.trino.tpch.TpchTable.CUSTOMER;
import static java.lang.String.format;
import static java.lang.String.join;
import static java.lang.Thread.currentThread;
Expand Down Expand Up @@ -184,6 +186,11 @@ public abstract class BaseConnectorTest
{
private static final Logger log = Logger.get(BaseConnectorTest.class);

protected static final List<TpchTable<?>> REQUIRED_TPCH_TABLES = ImmutableSet.<TpchTable<?>>builder()
.addAll(AbstractTestQueries.REQUIRED_TPCH_TABLES)
.add(CUSTOMER)
.build().asList();

private final ConcurrentMap<String, Function<ConnectorSession, List<String>>> mockTableListings = new ConcurrentHashMap<>();

@BeforeClass
Expand Down