Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the delta resource files to meaningful directory names #18847

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -440,7 +440,7 @@ public void testDropDatabricksTable()
{
testDropTable(
"testdrop_databricks",
"io/trino/plugin/deltalake/testing/resources/databricks/nation");
"io/trino/plugin/deltalake/testing/resources/databricks73/nation");
}

@Test
Expand Down Expand Up @@ -476,7 +476,7 @@ public void testDropAndRecreateTable()
@Test
public void testDropColumnNotSupported()
{
registerTableFromResources("testdropcolumn", "io/trino/plugin/deltalake/testing/resources/databricks/nation", getQueryRunner());
registerTableFromResources("testdropcolumn", "io/trino/plugin/deltalake/testing/resources/databricks73/nation", getQueryRunner());
assertQueryFails("ALTER TABLE testdropcolumn DROP COLUMN comment", "Cannot drop column from table using column mapping mode NONE");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected QueryRunner createQueryRunner()
.withNetwork(Network.newNetwork())
.withImage(HADOOP_BASE_IMAGE)
.withFilesToMount(ImmutableMap.of(
"/tmp/tpch-tiny", getPathFromClassPathResource("io/trino/plugin/deltalake/testing/resources/databricks"),
"/tmp/tpch-tiny", getPathFromClassPathResource("io/trino/plugin/deltalake/testing/resources/databricks73"),
"/etc/hadoop/conf/core-site.xml", hadoopCoreSiteXmlTempFile.toString()))
.build());
hiveHadoop.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public class TestDeltaLakeDatabricksCompatibility
{
public TestDeltaLakeDatabricksCompatibility()
{
super("io/trino/plugin/deltalake/testing/resources/databricks/");
super("io/trino/plugin/deltalake/testing/resources/databricks73/");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testDeleteDatabricksMultiFile()
{
testDeleteMultiFile(
"multi_file_databricks" + randomNameSuffix(),
"io/trino/plugin/deltalake/testing/resources/databricks");
"io/trino/plugin/deltalake/testing/resources/databricks73");
}

@Test
Expand Down Expand Up @@ -168,7 +168,7 @@ public void testDeleteAllDatabricks()
String tableName = "test_delete_all_databricks" + randomNameSuffix();
Set<String> originalFiles = testDeleteAllAndReturnInitialDataLakeFilesSet(
tableName,
"io/trino/plugin/deltalake/testing/resources/databricks");
"io/trino/plugin/deltalake/testing/resources/databricks73");

Set<String> expected = ImmutableSet.<String>builder()
.addAll(originalFiles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected QueryRunner createQueryRunner()

ImmutableList.of(LINE_ITEM, ORDERS).forEach(table -> {
String tableName = table.getTableName();
hiveMinioDataLake.copyResources("io/trino/plugin/deltalake/testing/resources/databricks/" + tableName, tableName);
hiveMinioDataLake.copyResources("io/trino/plugin/deltalake/testing/resources/databricks73/" + tableName, tableName);
queryRunner.execute(format("CALL %1$s.system.register_table('%2$s', '%3$s', 's3://%4$s/%3$s')",
DELTA_CATALOG,
"default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private DistributedQueryRunner createQueryRunner(boolean enablePerTransactionHiv

for (TpchTable<? extends TpchEntity> table : List.of(TpchTable.NATION, TpchTable.REGION)) {
String tableName = table.getTableName();
String resourcePath = "io/trino/plugin/deltalake/testing/resources/databricks/" + tableName + "/";
String resourcePath = "io/trino/plugin/deltalake/testing/resources/databricks73/" + tableName + "/";
Path tableDirectory = queryRunner.getCoordinator().getBaseDataDir().resolve("%s-%s".formatted(tableName, randomNameSuffix()));

for (ClassPath.ResourceInfo resourceInfo : ClassPath.from(getClass().getClassLoader()).getResources()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public class TestDeltaLakeDatabricksHdfsReads
{
public TestDeltaLakeDatabricksHdfsReads()
{
super("io/trino/plugin/deltalake/testing/resources/databricks/region");
super("io/trino/plugin/deltalake/testing/resources/databricks73/region");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TestDeltaLakeDatabricksMinioReads
{
public TestDeltaLakeDatabricksMinioReads()
{
super("region_databricks", "io/trino/plugin/deltalake/testing/resources/databricks/region");
super("region_databricks", "io/trino/plugin/deltalake/testing/resources/databricks73/region");
}

@Override
Expand Down