Skip to content

Commit 7b59a17

Browse files
author
xiao.dong
committed
revert new error code
1 parent b1ebcab commit 7b59a17

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/iceberg/expression/expression_visitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class ICEBERG_EXPORT BoundVisitor : public ExpressionVisitor<R> {
263263
/// Bound visitors do not support unbound predicates.
264264
///
265265
/// \param pred The unbound predicate
266-
Result<R> Predicate(const std::shared_ptr<UnboundPredicate>& pred) override {
266+
Result<R> Predicate(const std::shared_ptr<UnboundPredicate>& pred) final {
267267
ICEBERG_DCHECK(pred != nullptr, "UnboundPredicate cannot be null");
268268
return NotSupported("Not a bound predicate: {}", pred->ToString());
269269
}

src/iceberg/expression/inclusive_metrics_evaluator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class InclusiveMetricsVisitor : public BoundVisitor<bool> {
434434
int id = ref.field().field_id();
435435
auto type = ref.type();
436436
if (!type->is_primitive()) {
437-
return InvalidStats("Lower bound of non-primitive type is not supported.");
437+
return Invalid("Lower bound of non-primitive type is not supported.");
438438
}
439439
auto primitive_type = std::dynamic_pointer_cast<PrimitiveType>(type);
440440
if (!data_file_.lower_bounds.empty() && data_file_.lower_bounds.contains(id)) {
@@ -451,7 +451,7 @@ class InclusiveMetricsVisitor : public BoundVisitor<bool> {
451451
int id = ref.field().field_id();
452452
auto type = ref.type();
453453
if (!type->is_primitive()) {
454-
return InvalidStats("Upper bound of non-primitive type is not supported.");
454+
return Invalid("Upper bound of non-primitive type is not supported.");
455455
}
456456
auto primitive_type = std::dynamic_pointer_cast<PrimitiveType>(type);
457457
if (!data_file_.upper_bounds.empty() && data_file_.upper_bounds.contains(id)) {

src/iceberg/result.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ enum class ErrorKind {
4343
kInvalidManifest,
4444
kInvalidManifestList,
4545
kInvalidSchema,
46-
kInvalidStats,
4746
kIOError,
4847
kJsonParseError,
4948
kNamespaceNotEmpty,
@@ -105,7 +104,6 @@ DEFINE_ERROR_FUNCTION(InvalidExpression)
105104
DEFINE_ERROR_FUNCTION(InvalidManifest)
106105
DEFINE_ERROR_FUNCTION(InvalidManifestList)
107106
DEFINE_ERROR_FUNCTION(InvalidSchema)
108-
DEFINE_ERROR_FUNCTION(InvalidStats)
109107
DEFINE_ERROR_FUNCTION(IOError)
110108
DEFINE_ERROR_FUNCTION(JsonParseError)
111109
DEFINE_ERROR_FUNCTION(NamespaceNotEmpty)

0 commit comments

Comments
 (0)