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

Spark 3.4, 3.5: Enable drop table with purge in tests #9548

Merged
merged 1 commit into from
Jan 24, 2024
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 @@ -82,9 +82,7 @@ public TestRemoveOrphanFilesProcedure(

@After
public void removeTable() {
// TODO: use the Iceberg catalog to drop the table until SPARK-43203 is fixed
validationCatalog.dropTable(tableIdent, true /* purge */);
sql("DROP TABLE IF EXISTS %s", tableName);
sql("DROP TABLE IF EXISTS %s PURGE", tableName);
sql("DROP TABLE IF EXISTS p PURGE");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class TestDropTable extends SparkCatalogTestBase {
Expand Down Expand Up @@ -86,8 +85,7 @@ private void dropTableInternal() throws IOException {
}
}

// TODO: enable once SPARK-43203 is fixed
@Ignore
@Test
public void testPurgeTable() throws IOException {
assertEquals(
"Should have expected rows",
Expand All @@ -104,8 +102,7 @@ public void testPurgeTable() throws IOException {
Assert.assertTrue("All files should be deleted", checkFilesExist(manifestAndFiles, false));
}

// TODO: enable once SPARK-43203 is fixed
@Ignore
@Test
public void testPurgeTableGCDisabled() throws IOException {
sql("ALTER TABLE %s SET TBLPROPERTIES (gc.enabled = false)", tableName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ public TestRemoveOrphanFilesProcedure(

@After
public void removeTable() {
// TODO: use the Iceberg catalog to drop the table until SPARK-43203 is fixed
validationCatalog.dropTable(tableIdent, true /* purge */);
sql("DROP TABLE IF EXISTS %s", tableName);
sql("DROP TABLE IF EXISTS %s PURGE", tableName);
sql("DROP TABLE IF EXISTS p PURGE");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestTemplate;

public class TestDropTable extends CatalogTestBase {
Expand Down Expand Up @@ -85,8 +84,7 @@ private void dropTableInternal() throws IOException {
}
}

// TODO: enable once SPARK-43203 is fixed
@Disabled
@TestTemplate
public void testPurgeTable() throws IOException {
assertEquals(
"Should have expected rows",
Expand All @@ -102,8 +100,7 @@ public void testPurgeTable() throws IOException {
assertThat(checkFilesExist(manifestAndFiles, false)).as("All files should be deleted").isTrue();
}

// TODO: enable once SPARK-43203 is fixed
@Disabled
@TestTemplate
public void testPurgeTableGCDisabled() throws IOException {
sql("ALTER TABLE %s SET TBLPROPERTIES (gc.enabled = false)", tableName);

Expand Down