Skip to content

Commit 4e51282

Browse files
Address PR review comment.
Signed-off-by: Yury-Fridlyand <[email protected]>
1 parent 62bc46b commit 4e51282

File tree

1 file changed

+5
-3
lines changed
  • integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset

1 file changed

+5
-3
lines changed

integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/DBResult.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,11 @@ public boolean equals(final Object o) {
202202
// H2 calculates the value before setting column name
203203
// for example, for query "select 1 + 1" it returns a column named "2" instead of "1 + 1"
204204
boolean skipColumnNameCheck = databaseName.equalsIgnoreCase("h2") || other.databaseName.equalsIgnoreCase("h2");
205-
if ((!skipColumnNameCheck && !schema.equals(other.schema) || (skipColumnNameCheck &&
206-
!schema.stream().map(Type::getType).collect(Collectors.toList())
207-
.equals(other.schema.stream().map(Type::getType).collect(Collectors.toList()))))) {
205+
if (!skipColumnNameCheck && !schema.equals(other.schema)) {
206+
return false;
207+
}
208+
if (skipColumnNameCheck && !schema.stream().map(Type::getType).collect(Collectors.toList())
209+
.equals(other.schema.stream().map(Type::getType).collect(Collectors.toList()))) {
208210
return false;
209211
}
210212
return dataRows.equals(other.dataRows);

0 commit comments

Comments
 (0)