3434import static io .trino .tests .product .TestGroups .DELTA_LAKE_DATABRICKS_104 ;
3535import static io .trino .tests .product .TestGroups .DELTA_LAKE_DATABRICKS_113 ;
3636import static io .trino .tests .product .TestGroups .DELTA_LAKE_DATABRICKS_122 ;
37- import static io .trino .tests .product .TestGroups .DELTA_LAKE_EXCLUDE_91 ;
3837import static io .trino .tests .product .TestGroups .DELTA_LAKE_OSS ;
3938import static io .trino .tests .product .TestGroups .PROFILE_SPECIFIC_TESTS ;
4039import 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 ;
4240import static io .trino .tests .product .deltalake .util .DeltaLakeTestUtils .DATABRICKS_COMMUNICATION_FAILURE_ISSUE ;
4341import static io .trino .tests .product .deltalake .util .DeltaLakeTestUtils .DATABRICKS_COMMUNICATION_FAILURE_MATCH ;
4442import 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 );
0 commit comments