Skip to content

Commit 25690ea

Browse files
committed
Run testTimestampInsertCompatibility only in OSS Delta
1 parent f95b10a commit 25690ea

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeInsertCompatibility.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@
3434
import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS_104;
3535
import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS_113;
3636
import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS_122;
37-
import static io.trino.tests.product.TestGroups.DELTA_LAKE_EXCLUDE_91;
3837
import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS;
3938
import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS;
4039
import static io.trino.tests.product.deltalake.util.DatabricksVersion.DATABRICKS_104_RUNTIME_VERSION;
41-
import static io.trino.tests.product.deltalake.util.DatabricksVersion.DATABRICKS_133_RUNTIME_VERSION;
4240
import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE;
4341
import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH;
4442
import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.dropDeltaTableWithRetry;
@@ -141,7 +139,7 @@ public void testPartitionedInsertCompatibility()
141139
}
142140
}
143141

144-
@Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_91, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS})
142+
@Test(groups = {DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS})
145143
@Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH)
146144
public void testTimestampInsertCompatibility()
147145
{
@@ -159,20 +157,16 @@ public void testTimestampInsertCompatibility()
159157
"(3, TIMESTAMP '2023-03-04 01:02:03.999')," +
160158
"(4, TIMESTAMP '9999-12-31 23:59:59.999')");
161159

162-
// Databricks returns incorrect results before version 13.3
163-
Optional<String> expected = databricksRuntimeVersion.map(version -> version.isAtLeast(DATABRICKS_133_RUNTIME_VERSION) ? "0001-01-01 00:00:00.000" : "0001-01-03 00:00:00.000");
160+
List<Row> expected = ImmutableList.<Row>builder()
161+
.add(row(1, "0001-01-01 00:00:00.000"))
162+
.add(row(2, "2023-01-02 01:02:03.999"))
163+
.add(row(3, "2023-03-04 01:02:03.999"))
164+
.add(row(4, "9999-12-31 23:59:59.999"))
165+
.build();
164166
assertThat(onDelta().executeQuery("SELECT id, date_format(ts, \"yyyy-MM-dd HH:mm:ss.SSS\") FROM default." + tableName))
165-
.containsOnly(
166-
row(1, expected.orElse("0001-01-01 00:00:00.000")),
167-
row(2, "2023-01-02 01:02:03.999"),
168-
row(3, "2023-03-04 01:02:03.999"),
169-
row(4, "9999-12-31 23:59:59.999"));
167+
.containsOnly(expected);
170168
assertThat(onTrino().executeQuery("SELECT id, format_datetime(ts, 'yyyy-MM-dd HH:mm:ss.SSS') FROM delta.default." + tableName))
171-
.containsOnly(
172-
row(1, "0001-01-01 00:00:00.000"),
173-
row(2, "2023-01-02 01:02:03.999"),
174-
row(3, "2023-03-04 01:02:03.999"),
175-
row(4, "9999-12-31 23:59:59.999"));
169+
.containsOnly(expected);
176170
}
177171
finally {
178172
onTrino().executeQuery("DROP TABLE delta.default." + tableName);

testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/util/DatabricksVersion.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
public record DatabricksVersion(int majorVersion, int minorVersion)
2222
implements Comparable<DatabricksVersion>
2323
{
24-
public static final DatabricksVersion DATABRICKS_133_RUNTIME_VERSION = new DatabricksVersion(13, 3);
2524
public static final DatabricksVersion DATABRICKS_122_RUNTIME_VERSION = new DatabricksVersion(12, 2);
2625
public static final DatabricksVersion DATABRICKS_113_RUNTIME_VERSION = new DatabricksVersion(11, 3);
2726
public static final DatabricksVersion DATABRICKS_104_RUNTIME_VERSION = new DatabricksVersion(10, 4);

0 commit comments

Comments
 (0)