Skip to content

Commit 530a75a

Browse files
committed
bound type declare
1 parent b33d86c commit 530a75a

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/iceberg/expression/expression.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@
2525
#include <memory>
2626
#include <string>
2727

28+
#include "expression.h"
2829
#include "iceberg/exception.h"
2930
#include "iceberg/iceberg_export.h"
31+
#include "iceberg/result.h"
32+
#include "iceberg/schema.h"
3033

3134
namespace iceberg {
3235

@@ -89,6 +92,9 @@ constexpr bool IsPredicate(Operation op) {
8992
return false;
9093
}
9194

95+
96+
class BoundExpression;
97+
9298
/// \brief Represents a boolean expression tree.
9399
class ICEBERG_EXPORT Expression {
94100
public:
@@ -106,6 +112,11 @@ class ICEBERG_EXPORT Expression {
106112
}
107113

108114
virtual std::string ToString() const = 0;
115+
116+
virtual Result<std::unique_ptr<BoundExpression>> Bind(
117+
const Schema& schema, bool case_sensitive) const {
118+
return NotImplemented("Binding of Expression is not implemented");
119+
}
109120
};
110121

111122
class ICEBERG_EXPORT Predicate : public Expression {
@@ -226,4 +237,8 @@ class ICEBERG_EXPORT Or : public Predicate {
226237
std::shared_ptr<Predicate> right_;
227238
};
228239

240+
class ICEBERG_EXPORT BoundExpression {};
241+
242+
class ICEBERG_EXPORT BoundPredicate : public BoundExpression {};
243+
229244
} // namespace iceberg

src/iceberg/expression/term.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828

2929
namespace iceberg {
3030

31-
struct BoundedReference {};
31+
struct BoundReference {};
3232

3333
/// Unbounded reference type for expressions.
3434
struct Reference {
35-
using BoundedType = BoundedReference;
35+
using BoundType = BoundReference;
3636

3737
std::string name;
3838

3939
std::string ToString() const { return "Reference(name: " + name + ")"; }
4040

41-
Result<BoundedReference> Bind(const Schema& schema, bool case_sensitive) const;
41+
Result<BoundReference> Bind(const Schema& schema, bool case_sensitive) const;
4242
};
4343

4444
using Term = Reference;

0 commit comments

Comments
 (0)