Skip to content

Commit 8347df2

Browse files
committed
error out when meet unbound expr
1 parent f2674e8 commit 8347df2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/iceberg/expression/binder.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "iceberg/expression/binder.h"
2121

22+
#include "iceberg/result.h"
2223
#include "iceberg/util/macros.h"
2324

2425
namespace iceberg {
@@ -151,7 +152,7 @@ Result<FieldIdsSetRef> ReferenceVisitor::Predicate(
151152

152153
Result<FieldIdsSetRef> ReferenceVisitor::Predicate(
153154
[[maybe_unused]] const std::shared_ptr<UnboundPredicate>& pred) {
154-
return referenced_field_ids_;
155+
return InvalidExpression("Cannot get referenced field IDs from unbound predicate");
155156
}
156157

157158
Result<FieldIdsSetRef> ReferenceVisitor::Aggregate(
@@ -162,7 +163,7 @@ Result<FieldIdsSetRef> ReferenceVisitor::Aggregate(
162163

163164
Result<FieldIdsSetRef> ReferenceVisitor::Aggregate(
164165
[[maybe_unused]] const std::shared_ptr<UnboundAggregate>& aggregate) {
165-
return referenced_field_ids_;
166+
return InvalidExpression("Cannot get referenced field IDs from unbound aggregate");
166167
}
167168

168169
} // namespace iceberg

0 commit comments

Comments
 (0)