wgtmac commented on code in PR #746:
URL: https://github.com/apache/iceberg-cpp/pull/746#discussion_r3484907818
##########
src/iceberg/schema_field.cc:
##########
@@ -72,9 +143,23 @@ std::string SchemaField::ToString() const {
return result;
}
+namespace {
+
+bool DefaultEquals(const std::shared_ptr<const Literal>& lhs,
+ const std::shared_ptr<const Literal>& rhs) {
+ if (lhs == nullptr || rhs == nullptr) {
+ return lhs == rhs;
+ }
+ return *lhs == *rhs;
Review Comment:
Just a reminder that `Literal::operator<=>` returns unordered when any side
`IsNull()` returns true so two null defaults do not equal. I think we should
fix `Literal::operator<=>` to be null safe?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]