bkietz commented on a change in pull request #11579:
URL: https://github.com/apache/arrow/pull/11579#discussion_r745804936
##########
File path: cpp/src/arrow/compute/exec/expression.h
##########
@@ -91,6 +91,9 @@ class ARROW_EXPORT Expression {
/// Return true if this expression could evaluate to true.
bool IsSatisfiable() const;
+ /// Return true if this expression has no clauses.
+ bool IsEmpty() const;
Review comment:
`Expression()` is currently allowed to enable preallocation in
`std::vector<Expression>`. IIUC, the only circumstances under which an
expression would be empty are (a) a preallocated element of a container which
will be overwritten shortly (b) a moved-from variable, *any* use of which
should be avoided or (c) when used as a special-case placeholder for non-empty
expressions.
If I'm missing something, please file a follow up JIRA for adding
`IsEmpty()`.
--
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]