pitrou commented on a change in pull request #12351:
URL: https://github.com/apache/arrow/pull/12351#discussion_r802884659
##########
File path: cpp/src/gandiva/expr_decomposer.cc
##########
@@ -190,21 +192,25 @@ Status ExprDecomposer::Visit(const
InExpressionNode<gandiva::DecimalScalar128>&
/* In always outputs valid results, so no validity dex */
auto value_dex = std::make_shared<InExprDex<gandiva::DecimalScalar128>>(
args, node.values(), node.get_precision(), node.get_scale());
+ int holder_idx = annotator_.AddHolderPointer(value_dex->in_holder().get());
+ value_dex->set_holder_idx(holder_idx);
result_ = std::make_shared<ValueValidityPair>(value_dex);
return Status::OK();
}
-#define MAKE_VISIT_IN(ctype) \
- Status ExprDecomposer::Visit(const InExpressionNode<ctype>& node) { \
- /* decompose the children. */ \
- std::vector<ValueValidityPairPtr> args; \
- auto status = node.eval_expr()->Accept(*this); \
- ARROW_RETURN_NOT_OK(status); \
- args.push_back(result()); \
- /* In always outputs valid results, so no validity dex */ \
- auto value_dex = std::make_shared<InExprDex<ctype>>(args, node.values()); \
- result_ = std::make_shared<ValueValidityPair>(value_dex); \
- return Status::OK(); \
+#define MAKE_VISIT_IN(ctype)
\
+ Status ExprDecomposer::Visit(const InExpressionNode<ctype>& node) {
\
Review comment:
Can we avoid a long C macro here? For example:
```c++
template <typename ctype>
Status ExprDecomposer::VisitExprGeneric(const InExpressionNode<ctype>&
node) {
/* decompose the children. */
}
Status ExprDecomposer::Visit(const InExpressionNode<int32_t>& node) {
return VisitExprGeneric(node);
}
// etc.
```
--
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]