Skip to content

Commit

Permalink
fixed compare, the test cases still assume the different type names i…
Browse files Browse the repository at this point in the history
…n structs are allowed
  • Loading branch information
SterlingT3485 committed Nov 25, 2024
1 parent e6f9b2b commit 75d14f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/function/comparison_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ void Equals::operation(const struct_entry_t& left, const struct_entry_t& right,
}
}
result = true;
// For STRUCT type, we also need to check their field names
if (result || leftVector->dataType.getLogicalTypeID() == LogicalTypeID::STRUCT || rightVector->dataType.getLogicalTypeID() == LogicalTypeID::STRUCT) {
auto leftTypeNames = StructType::getFieldNames(leftVector->dataType);
auto rightTypeNames = StructType::getFieldNames(rightVector->dataType);
for (auto i = 0u; i < leftTypeNames.size(); i++) {
if (leftTypeNames[i] != rightTypeNames[i]) {
result = false;
}
}
}
}

static void executeNestedGreaterThan(uint8_t& isGreaterThan, uint8_t& isEqual,
Expand Down

0 comments on commit 75d14f9

Please sign in to comment.