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


##########
cpp/src/arrow/compute/exec/options.h:
##########
@@ -393,22 +393,35 @@ class ARROW_EXPORT HashJoinNodeOptions : public 
ExecNodeOptions {
 /// This node will output one row for each row in the left table.
 class ARROW_EXPORT AsofJoinNodeOptions : public ExecNodeOptions {
  public:
-  AsofJoinNodeOptions(FieldRef on_key, std::vector<FieldRef> by_key, int64_t 
tolerance)
-      : on_key(std::move(on_key)), by_key(by_key), tolerance(tolerance) {}
-
-  /// \brief "on" key for the join.
+  /// \brief Keys for one input table of the AsofJoin operation
   ///
-  /// All inputs tables must be sorted by the "on" key. Must be a single field 
of a common
-  /// type. Inexact match is used on the "on" key. i.e., a row is considered 
match iff
-  /// left_on - tolerance <= right_on <= left_on.
-  /// Currently, the "on" key must be of an integer, date, or timestamp type.
-  FieldRef on_key;
-  /// \brief "by" key for the join.
+  /// The keys must be consistent across the input tables:
+  /// Each "on" key must refer to a field of the same type and units across 
the tables.
+  /// Each "by" key must refer to a list of fields of the same types across 
the tables.
+  struct Keys {
+    /// \brief "on" key for the join.
+    ///
+    /// The input table must be sorted by the "on" key. Must be a single field 
of a common
+    /// type. Inexact match is used on the "on" key. i.e., a row is considered 
match iff
+    /// left_on - tolerance <= right_on <= left_on.
+    /// Currently, the "on" key must be of an integer, date, or timestamp type.
+    FieldRef on_key;
+    /// \brief "by" key for the join.
+    ///
+    /// The input table must have each field of the "by" key.  Exact equality 
is used for
+    /// each field of the "by" key.
+    /// Currently, each field of the "by" key must be of an integer, date, 
timestamp, or
+    /// base-binary type.

Review Comment:
   Currently, `AsofJoinNode` support `bool` for data (payload) fields only. It 
is not too hard to add support for `bool` on-key fields, but let's do it 
separately.



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