wgtmac commented on code in PR #177:
URL: https://github.com/apache/iceberg-cpp/pull/177#discussion_r2375984381
##########
src/iceberg/expression/expression.cc:
##########
@@ -87,4 +91,100 @@ bool Or::Equals(const Expression& expr) const {
return false;
}
+std::string_view ToString(Expression::Operation op) {
+ switch (op) {
+ case Expression::Operation::kAnd:
+ return "AND";
+ case Expression::Operation::kOr:
+ return "OR";
+ case Expression::Operation::kTrue:
+ return "TRUE";
+ case Expression::Operation::kFalse:
+ return "FALSE";
+ case Expression::Operation::kIsNull:
+ return "IS_NULL";
+ case Expression::Operation::kNotNull:
+ return "NOT_NULL";
+ case Expression::Operation::kIsNan:
+ return "IS_NAN";
+ case Expression::Operation::kNotNan:
+ return "NOT_NAN";
+ case Expression::Operation::kLt:
+ return "LT";
+ case Expression::Operation::kLtEq:
+ return "LT_EQ";
+ case Expression::Operation::kGt:
+ return "GT";
+ case Expression::Operation::kGtEq:
+ return "GT_EQ";
+ case Expression::Operation::kEq:
+ return "EQ";
+ case Expression::Operation::kNotEq:
+ return "NOT_EQ";
+ case Expression::Operation::kIn:
+ return "IN";
+ case Expression::Operation::kNotIn:
+ return "NOT_IN";
+ case Expression::Operation::kStartsWith:
+ return "STARTS_WITH";
+ case Expression::Operation::kNotStartsWith:
+ return "NOT_STARTS_WITH";
+ case Expression::Operation::kCount:
+ return "COUNT";
+ case Expression::Operation::kNot:
+ return "NOT";
+ case Expression::Operation::kCountStar:
+ return "COUNT_STAR";
+ case Expression::Operation::kMax:
+ return "MAX";
+ case Expression::Operation::kMin:
+ return "MIN";
Review Comment:
They do not exist in the rest spec but are supported expressions by the Java
code.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]