lidavidm commented on a change in pull request #11541:
URL: https://github.com/apache/arrow/pull/11541#discussion_r736678315



##########
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:
       Now that I read the docstring, though, it looks like timezone is allowed 
to be an offset string, but our kernels don't handle that case (they all assume 
it to be a timezone name). Filed ARROW-14477.




-- 
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]


Reply via email to