pitrou commented on code in PR #34392:
URL: https://github.com/apache/arrow/pull/34392#discussion_r1196422685
##########
cpp/src/arrow/acero/asof_join_node_test.cc:
##########
@@ -451,6 +438,53 @@ struct BasicTest {
return types;
}
+// code generation for the by_key types supported by AsofJoinNodeOptions
constructors
+// which cannot be directly done using templates because of failure to deduce
the template
+// argument for an invocation with a string- or initializer_list-typed
keys-argument
+#define EXPAND_BY_KEY_TYPE(macro) \
+ macro(const FieldRef); \
+ macro(std::vector<FieldRef>); \
+ macro(std::initializer_list<FieldRef>);
+
+#define CHECK_RUN_OUTPUT(by_key_type)
\
+ void CheckRunOutput(
\
+ const BatchesWithSchema& l_batches, const BatchesWithSchema& r0_batches,
\
+ const BatchesWithSchema& r1_batches, const BatchesWithSchema&
exp_batches, \
+ const FieldRef time, by_key_type key, const int64_t tolerance) {
\
+ CheckRunOutput(l_batches, r0_batches, r1_batches, exp_batches,
\
+ GetRepeatedOptions(3, time, {key}, tolerance));
\
+ }
+
+ EXPAND_BY_KEY_TYPE(CHECK_RUN_OUTPUT)
+
+#undef CHECK_RUN_OUTPUT
+#undef EXPAND_BY_KEY_TYPE
+
+ void CheckRunOutput(const BatchesWithSchema& l_batches,
+ const BatchesWithSchema& r0_batches,
+ const BatchesWithSchema& r1_batches,
+ const BatchesWithSchema& exp_batches,
+ const AsofJoinNodeOptions join_options) {
+#ifndef NDEBUG
Review Comment:
This discussion can (should?) be revisited once the `NDEBUG` API dependency
is fixed.
--
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]