@@ -73,9 +73,10 @@ void explainResultSetMetadataTest() throws Exception {
73
73
"EXECUTION_STATE" ,
74
74
"VERSION" ,
75
75
"PLAN_HASH_MODE" ,
76
+ "PLAN_HASH" ,
76
77
"SERIALIZED_PLAN_COMPLEXITY"
77
78
);
78
- final var expectedContTypes = List .of (Types .BINARY , Types .INTEGER , Types .VARCHAR , Types .INTEGER );
79
+ final var expectedContTypes = List .of (Types .BINARY , Types .INTEGER , Types .VARCHAR , Types .INTEGER , Types . INTEGER );
79
80
try (var ddl = Ddl .builder ().database (URI .create ("/TEST/QT" )).relationalExtension (relationalExtension ).schemaTemplate (schemaTemplate ).build ()) {
80
81
executeInsert (ddl );
81
82
try (RelationalPreparedStatement ps = ddl .setSchemaAndGetConnection ().prepareStatement ("EXPLAIN SELECT * FROM RestaurantComplexRecord" )) {
@@ -108,7 +109,7 @@ void explainWithNoContinuationTest() throws Exception {
108
109
final var assertResult = ResultSetAssert .assertThat (resultSet );
109
110
assertResult .hasNextRow ()
110
111
.hasColumn ("PLAN" , "ISCAN(RECORD_NAME_IDX <,>)" )
111
- .hasColumn ("PLAN_HASH" , -1635569052L )
112
+ .hasColumn ("PLAN_HASH" , -1635569052 )
112
113
.hasColumn ("PLAN_CONTINUATION" , null );
113
114
assertResult .hasNoNextRow ();
114
115
}
@@ -132,15 +133,17 @@ void explainWithContinuationNoSerializedPlanTest() throws Exception {
132
133
ps .setObject ("cont" , continuation .serialize ());
133
134
try (final RelationalResultSet resultSet = ps .executeQuery ()) {
134
135
final var assertResult = ResultSetAssert .assertThat (resultSet );
136
+
135
137
assertResult .hasNextRow ()
136
138
.hasColumn ("PLAN" , "ISCAN(RECORD_NAME_IDX <,>)" )
137
- .hasColumn ("PLAN_HASH" , -1635569052L );
139
+ .hasColumn ("PLAN_HASH" , -1635569052 );
138
140
final var continuationInfo = resultSet .getStruct (5 );
139
141
org .junit .jupiter .api .Assertions .assertNotNull (continuationInfo );
140
142
final var assertStruct = RelationalStructAssert .assertThat (continuationInfo );
141
143
assertStruct .hasValue ("EXECUTION_STATE" , new byte []{0 , 21 , 1 , 21 , 11 });
142
144
assertStruct .hasValue ("VERSION" , 1 );
143
145
assertStruct .hasValue ("PLAN_HASH_MODE" , null );
146
+ assertStruct .hasValue ("PLAN_HASH" , -1635569052 );
144
147
assertStruct .hasValue ("SERIALIZED_PLAN_COMPLEXITY" , null );
145
148
}
146
149
}
@@ -166,13 +169,14 @@ void explainWithContinuationSerializedPlanTest() throws Exception {
166
169
final var assertResult = ResultSetAssert .assertThat (resultSet );
167
170
assertResult .hasNextRow ()
168
171
.hasColumn ("PLAN" , "ISCAN(RECORD_NAME_IDX <,>)" )
169
- .hasColumn ("PLAN_HASH" , -1635569052L );
172
+ .hasColumn ("PLAN_HASH" , -1635569052 );
170
173
final var continuationInfo = resultSet .getStruct (5 );
171
174
org .junit .jupiter .api .Assertions .assertNotNull (continuationInfo );
172
175
final var assertStruct = RelationalStructAssert .assertThat (continuationInfo );
173
176
assertStruct .hasValue ("EXECUTION_STATE" , new byte []{0 , 21 , 1 , 21 , 11 });
174
177
assertStruct .hasValue ("VERSION" , 1 );
175
178
assertStruct .hasValue ("PLAN_HASH_MODE" , "VC0" );
179
+ assertStruct .hasValue ("PLAN_HASH" , -1635569052 );
176
180
assertStruct .hasValue ("SERIALIZED_PLAN_COMPLEXITY" , 1 );
177
181
}
178
182
}
@@ -198,13 +202,14 @@ void explainExecuteStatementTest() throws Exception {
198
202
final var assertResult = ResultSetAssert .assertThat (resultSet );
199
203
assertResult .hasNextRow ()
200
204
.hasColumn ("PLAN" , "ISCAN(RECORD_NAME_IDX <,>)" )
201
- .hasColumn ("PLAN_HASH" , -1635569052L );
205
+ .hasColumn ("PLAN_HASH" , -1635569052 );
202
206
final var continuationInfo = resultSet .getStruct (5 );
203
207
org .junit .jupiter .api .Assertions .assertNotNull (continuationInfo );
204
208
final var assertStruct = RelationalStructAssert .assertThat (continuationInfo );
205
209
assertStruct .hasValue ("EXECUTION_STATE" , new byte []{0 , 21 , 1 , 21 , 11 });
206
210
assertStruct .hasValue ("VERSION" , 1 );
207
211
assertStruct .hasValue ("PLAN_HASH_MODE" , "VC0" );
212
+ assertStruct .hasValue ("PLAN_HASH" , -1635569052 );
208
213
assertStruct .hasValue ("SERIALIZED_PLAN_COMPLEXITY" , 1 );
209
214
}
210
215
}
0 commit comments