Skip to content

Commit

Permalink
Address PR review comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
  • Loading branch information
Yury-Fridlyand committed Jun 23, 2023
1 parent 62bc46b commit 4e51282
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ public boolean equals(final Object o) {
// H2 calculates the value before setting column name
// for example, for query "select 1 + 1" it returns a column named "2" instead of "1 + 1"
boolean skipColumnNameCheck = databaseName.equalsIgnoreCase("h2") || other.databaseName.equalsIgnoreCase("h2");
if ((!skipColumnNameCheck && !schema.equals(other.schema) || (skipColumnNameCheck &&
!schema.stream().map(Type::getType).collect(Collectors.toList())
.equals(other.schema.stream().map(Type::getType).collect(Collectors.toList()))))) {
if (!skipColumnNameCheck && !schema.equals(other.schema)) {
return false;
}
if (skipColumnNameCheck && !schema.stream().map(Type::getType).collect(Collectors.toList())
.equals(other.schema.stream().map(Type::getType).collect(Collectors.toList()))) {
return false;
}
return dataRows.equals(other.dataRows);
Expand Down

0 comments on commit 4e51282

Please sign in to comment.