@@ -28,7 +28,7 @@ public void testSimple() throws Exception {
28
28
assertThat (resultSet .next ()).as ("has result" ).isTrue ();
29
29
assertThat (resultSet .getString ("node_version" ))
30
30
.as ("Presto version" )
31
- .isEqualTo (PrestoContainer .DEFAULT_TAG );
31
+ .startsWith (PrestoContainer .DEFAULT_TAG );
32
32
assertHasCorrectExposedAndLivenessCheckPorts (prestoSql );
33
33
}
34
34
}
@@ -48,7 +48,7 @@ public void testSpecificVersion() throws Exception {
48
48
assertThat (resultSet .next ()).as ("has result" ).isTrue ();
49
49
assertThat (resultSet .getString ("node_version" ))
50
50
.as ("Presto version" )
51
- .isEqualTo (PrestoTestImages .PRESTO_PREVIOUS_VERSION_TEST_IMAGE .getVersionPart ());
51
+ .startsWith (PrestoTestImages .PRESTO_PREVIOUS_VERSION_TEST_IMAGE .getVersionPart ());
52
52
}
53
53
}
54
54
}
@@ -73,15 +73,15 @@ public void testQueryMemoryAndTpch() throws SQLException {
73
73
"SELECT nationkey, element " +
74
74
"FROM tpch.tiny.nation " +
75
75
"JOIN memory.default.table_with_array twa ON nationkey = twa.id " +
76
- "LEFT JOIN UNNEST(my_array) a(element) ON true " +
77
- "ORDER BY element OFFSET 1 FETCH NEXT 3 ROWS WITH TIES "
76
+ "CROSS JOIN UNNEST(my_array) a(element) " +
77
+ "ORDER BY element OFFSET 1 FETCH FIRST 3 ROWS ONLY "
78
78
)
79
79
) {
80
80
List <Integer > actualElements = new ArrayList <>();
81
81
while (resultSet .next ()) {
82
82
actualElements .add (resultSet .getInt ("element" ));
83
83
}
84
- assertThat (actualElements ).isEqualTo (Arrays .asList (2 , 4 , 42 , 42 , 42 ));
84
+ assertThat (actualElements ).isEqualTo (Arrays .asList (2 , 4 , 42 ));
85
85
}
86
86
}
87
87
}
@@ -112,8 +112,7 @@ public void testTcJdbcUri() throws Exception {
112
112
)
113
113
) {
114
114
// Verify metadata with tc: JDBC connection URI
115
- assertThat (Integer .parseInt (PrestoContainer .DEFAULT_TAG ))
116
- .isEqualTo (connection .getMetaData ().getDatabaseMajorVersion ());
115
+ assertThat (0 ).isEqualTo (connection .getMetaData ().getDatabaseMajorVersion ());
117
116
118
117
// Verify transactions with tc: JDBC connection URI
119
118
assertThat (connection .getAutoCommit ()).as ("Is autocommit" ).isTrue ();
@@ -128,12 +127,10 @@ public void testTcJdbcUri() throws Exception {
128
127
.as ("Update result" )
129
128
.isEqualTo (0 );
130
129
try (
131
- ResultSet resultSet = statement .executeQuery (
132
- "SELECT sum(cast(node_version AS bigint)) AS v FROM system.runtime.nodes"
133
- )
130
+ ResultSet resultSet = statement .executeQuery ("SELECT node_version AS v FROM system.runtime.nodes" )
134
131
) {
135
132
assertThat (resultSet .next ()).isTrue ();
136
- assertThat (resultSet .getString ("v" )).isEqualTo (PrestoContainer .DEFAULT_TAG );
133
+ assertThat (resultSet .getString ("v" )).startsWith (PrestoContainer .DEFAULT_TAG );
137
134
assertThat (resultSet .next ()).isFalse ();
138
135
}
139
136
connection .commit ();
0 commit comments