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 @@ -60,7 +60,6 @@
import static io.trino.spi.session.PropertyMetadata.stringProperty;
import static io.trino.spi.testing.InterfaceTestUtils.assertAllMethodsOverridden;
import static io.trino.spi.type.IntegerType.INTEGER;
import static io.trino.testing.TestingConnectorSession.builder;
import static io.trino.testing.TestingNames.randomNameSuffix;
import static java.lang.String.format;
import static java.util.Collections.emptyList;
Expand Down Expand Up @@ -870,15 +869,15 @@ private JdbcColumnHandle addColumn(JdbcClient client, JdbcTableHandle tableHandl

private static ConnectorSession createSession(String sessionName)
{
return builder()
return TestingConnectorSession.builder()
.setPropertyMetadata(PROPERTY_METADATA)
.setPropertyValues(ImmutableMap.of("session_name", sessionName))
.build();
}

private static ConnectorSession createUserSession(String userName)
{
return builder()
return TestingConnectorSession.builder()
.setIdentity(ConnectorIdentity.forUser(userName)
.withExtraCredentials(ImmutableMap.of("user", userName))
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.ImmutableList.builder;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.io.MoreFiles.deleteRecursively;
Expand Down Expand Up @@ -236,7 +235,7 @@ public synchronized void dropTable(String databaseName, String tableName, boolea

private static List<String> listAllDataPaths(ThriftMetastore metastore, String schemaName, String tableName)
{
ImmutableList.Builder<String> locations = builder();
ImmutableList.Builder<String> locations = ImmutableList.builder();
Table table = metastore.getTable(schemaName, tableName).get();
if (table.getSd().getLocation() != null) {
// For unpartitioned table, there should be nothing directly under this directory.
Expand Down Expand Up @@ -413,7 +412,7 @@ private static boolean partitionMatches(Partition partition, String databaseName
@Override
public synchronized List<Partition> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames)
{
ImmutableList.Builder<Partition> builder = builder();
ImmutableList.Builder<Partition> builder = ImmutableList.builder();
for (String name : partitionNames) {
PartitionName partitionName = PartitionName.partition(databaseName, tableName, name);
Partition partition = partitions.get(partitionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

import static io.trino.plugin.hive.HiveTestUtils.SOCKS_PROXY;
import static io.trino.plugin.hive.TestingThriftHiveMetastoreBuilder.testingThriftHiveMetastoreBuilder;
import static io.trino.testing.DistributedQueryRunner.builder;
import static io.trino.testing.TestingConnectorSession.SESSION;
import static io.trino.testing.TestingSession.testSessionBuilder;
import static io.trino.testing.containers.Minio.MINIO_ACCESS_KEY;
Expand Down Expand Up @@ -86,7 +85,7 @@ public static DistributedQueryRunner create(
// do nothing if database already exists
}

DistributedQueryRunner queryRunner = builder(createSession())
DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(createSession())
.setExtraProperties(extraProperties)
.build();
queryRunner.installPlugin(new TestingHudiPlugin(Optional.of(metastore)));
Expand Down