Skip to content

Conversation

@wgtmac
Copy link
Member

@wgtmac wgtmac commented Nov 19, 2025

No description provided.

@wgtmac
Copy link
Member Author

wgtmac commented Nov 20, 2025

@zhjwpku @HuaHuaY @HeartLinked PTAL


class Evaluator::EvalVisitor : public BoundVisitor<bool> {
public:
void UpdateRow(const StructLike* row) { row_ = row; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can create a new object in Evaluator::Eval like java's implementation and change UpdateRow to constructor. So we don't need ICEBERG_DCHECK(row_, "Row is not set") in every methods.

}

Result<bool> NotNull(const std::shared_ptr<BoundTerm>& term) override {
ICEBERG_DCHECK(row_, "Row is not set");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a strong opinion, we could adopt the same pattern used for Eq/NotEq, where NotXXX calls XXX and returns !result. Ditto for Lt/GtEq and Gt/LtEq.


class Evaluator::EvalVisitor : public BoundVisitor<bool> {
public:
void UpdateRow(const StructLike* row) { row_ = row; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: SetRow? since this method doesn't update anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants