Skip to content

Commit 1ff91f6

Browse files
committed
fix export and switch case
1 parent 5ef253d commit 1ff91f6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/iceberg/expression/expression.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,18 @@ Result<Expression::Operation> Negate(Expression::Operation op) {
173173
return Expression::Operation::kNotStartsWith;
174174
case Expression::Operation::kNotStartsWith:
175175
return Expression::Operation::kStartsWith;
176-
default:
176+
case Expression::Operation::kTrue:
177+
case Expression::Operation::kFalse:
178+
case Expression::Operation::kNot:
179+
case Expression::Operation::kCountStar:
180+
case Expression::Operation::kMax:
181+
case Expression::Operation::kMin:
182+
case Expression::Operation::kAnd:
183+
case Expression::Operation::kOr:
184+
case Expression::Operation::kCount:
177185
return InvalidArgument("No negation for operation: {}", op);
178186
}
187+
std::unreachable();
179188
}
180189

181190
} // namespace iceberg

src/iceberg/expression/expression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,6 @@ class ICEBERG_EXPORT Or : public Expression {
198198
ICEBERG_EXPORT std::string_view ToString(Expression::Operation op);
199199

200200
/// \brief Returns the negated operation.
201-
Result<Expression::Operation> Negate(Expression::Operation op);
201+
ICEBERG_EXPORT Result<Expression::Operation> Negate(Expression::Operation op);
202202

203203
} // namespace iceberg

0 commit comments

Comments
 (0)