jorisvandenbossche commented on a change in pull request #11541:
URL: https://github.com/apache/arrow/pull/11541#discussion_r736673871
##########
File path: cpp/src/arrow/compute/kernels/scalar_compare.cc
##########
@@ -140,6 +140,23 @@ struct Maximum {
// Implement Less, LessEqual by flipping arguments to Greater, GreaterEqual
+template <typename OutType, typename ArgType, typename Op>
+struct CompareTimestamps
+ : public applicator::ScalarBinaryEqualTypes<OutType, ArgType, Op> {
+ using Base = applicator::ScalarBinaryEqualTypes<OutType, ArgType, Op>;
+
+ static Status Exec(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
+ const auto& lhs = checked_cast<const TimestampType&>(*batch[0].type());
+ const auto& rhs = checked_cast<const TimestampType&>(*batch[1].type());
+ if (lhs.timezone().empty() ^ rhs.timezone().empty()) {
Review comment:
Those `emtpy()` checks, that works for both the cases of the timezone
not being set as the string being an empty string ("")?
--
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]