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: Don't skip tests in TestSelect for SparkSessionCatalog #11824

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -38,7 +38,6 @@
import org.apache.spark.sql.Row;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

Expand Down Expand Up @@ -135,10 +134,6 @@ public void testExpressionPushdown() {

@Test
public void testMetadataTables() {
Assume.assumeFalse(
"Spark session catalog does not support metadata tables",
"spark_catalog".equals(catalogName));

assertEquals(
"Snapshot metadata table",
ImmutableList.of(row(ANY, ANY, null, "append", ANY, ANY)),
Expand All @@ -147,10 +142,6 @@ public void testMetadataTables() {

@Test
public void testSnapshotInTableName() {
Assume.assumeFalse(
"Spark session catalog does not support extended table names",
"spark_catalog".equals(catalogName));

// get the snapshot ID of the last write and get the current row set as expected
long snapshotId = validationCatalog.loadTable(tableIdent).currentSnapshot().snapshotId();
List<Object[]> expected = sql("SELECT * FROM %s", tableName);
Expand All @@ -176,10 +167,6 @@ public void testSnapshotInTableName() {

@Test
public void testTimestampInTableName() {
Assume.assumeFalse(
"Spark session catalog does not support extended table names",
"spark_catalog".equals(catalogName));

// get a timestamp just after the last write and get the current row set as expected
long snapshotTs = validationCatalog.loadTable(tableIdent).currentSnapshot().timestampMillis();
long timestamp = waitUntilAfter(snapshotTs + 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.apache.spark.sql.Row;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

Expand Down Expand Up @@ -135,10 +134,6 @@ public void testExpressionPushdown() {

@Test
public void testMetadataTables() {
Assume.assumeFalse(
"Spark session catalog does not support metadata tables",
"spark_catalog".equals(catalogName));

assertEquals(
"Snapshot metadata table",
ImmutableList.of(row(ANY, ANY, null, "append", ANY, ANY)),
Expand All @@ -147,10 +142,6 @@ public void testMetadataTables() {

@Test
public void testSnapshotInTableName() {
Assume.assumeFalse(
"Spark session catalog does not support extended table names",
"spark_catalog".equals(catalogName));

// get the snapshot ID of the last write and get the current row set as expected
long snapshotId = validationCatalog.loadTable(tableIdent).currentSnapshot().snapshotId();
List<Object[]> expected = sql("SELECT * FROM %s", tableName);
Expand All @@ -176,10 +167,6 @@ public void testSnapshotInTableName() {

@Test
public void testTimestampInTableName() {
Assume.assumeFalse(
"Spark session catalog does not support extended table names",
"spark_catalog".equals(catalogName));

// get a timestamp just after the last write and get the current row set as expected
long snapshotTs = validationCatalog.loadTable(tableIdent).currentSnapshot().timestampMillis();
long timestamp = waitUntilAfter(snapshotTs + 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assumptions.assumeThat;

import java.text.SimpleDateFormat;
import java.util.Arrays;
Expand Down Expand Up @@ -158,10 +157,6 @@ public void testExpressionPushdown() {

@TestTemplate
public void testMetadataTables() {
assumeThat(catalogName)
.as("Spark session catalog does not support metadata tables")
.isNotEqualTo("spark_catalog");

assertEquals(
"Snapshot metadata table",
ImmutableList.of(row(ANY, ANY, null, "append", ANY, ANY)),
Expand All @@ -170,10 +165,6 @@ public void testMetadataTables() {

@TestTemplate
public void testSnapshotInTableName() {
assumeThat(catalogName)
.as("Spark session catalog does not support extended table names")
.isNotEqualTo("spark_catalog");

// get the snapshot ID of the last write and get the current row set as expected
long snapshotId = validationCatalog.loadTable(tableIdent).currentSnapshot().snapshotId();
List<Object[]> expected = sql("SELECT * FROM %s", tableName);
Expand All @@ -199,10 +190,6 @@ public void testSnapshotInTableName() {

@TestTemplate
public void testTimestampInTableName() {
assumeThat(catalogName)
.as("Spark session catalog does not support extended table names")
.isNotEqualTo("spark_catalog");

// get a timestamp just after the last write and get the current row set as expected
long snapshotTs = validationCatalog.loadTable(tableIdent).currentSnapshot().timestampMillis();
long timestamp = waitUntilAfter(snapshotTs + 2);
Expand Down
Loading