rtpsw commented on code in PR #13880:
URL: https://github.com/apache/arrow/pull/13880#discussion_r946977375


##########
cpp/src/arrow/compute/exec/asof_join_node.cc:
##########
@@ -184,18 +280,51 @@ class InputState {
     return queue_.UnsyncFront();
   }
 
+#define LATEST_VAL_CASE(id, val)                            \
+  case Type::id: {                                          \
+    using T = typename TypeIdTraits<Type::id>::Type;        \
+    using CType = typename TypeTraits<T>::CType;            \
+    return val(data->GetValues<CType>(1)[latest_ref_row_]); \
+  }
+
   KeyType GetLatestKey() const {
-    return queue_.UnsyncFront()
-        ->column_data(key_col_index_)
-        ->GetValues<KeyType>(1)[latest_ref_row_];
+    if (key_hasher_ != NULLPTR) {

Review Comment:
   The key_hasher is (made available and) used when the faster-path, which 
computes using `norm_value` on a single-key, does not apply. Currently, this 
only happens with a multi-key, but in the future will also happen when the 
single-key type cannot be coerced into a 64-bits ordered type, e.g., with a 
string-typed single-key.



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