zhjwpku commented on code in PR #653:
URL: https://github.com/apache/iceberg-cpp/pull/653#discussion_r3288041909
##########
src/iceberg/expression/literal.cc:
##########
@@ -395,8 +438,11 @@ bool Comparable(TypeId lhs, TypeId rhs) {
case TypeId::kLong:
case TypeId::kTimestamp:
case TypeId::kTimestampTz:
+ case TypeId::kTimestampNs:
+ case TypeId::kTimestampTzNs:
return rhs == TypeId::kLong || rhs == TypeId::kTimestamp ||
- rhs == TypeId::kTimestampTz;
+ rhs == TypeId::kTimestampTz || rhs == TypeId::kTimestampNs ||
Review Comment:
Yeah, in Java, BaseLiteral<T>.equals requires the lhs and rhs to have the
same getClass(). Since zoned and non-zoned timestamps appear to share the same
class, I think we should allow kTimestamp/kTimestampTz and
kTimestampNs/kTimestampTzNs to be comparable.
--
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]