Skip to content

Commit

Permalink
chore: fix code for bot comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Jan 16, 2025
1 parent 518857e commit 8dbecf5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions be/src/exprs/try_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class TryExpr final : public Expr {

StatusOr<ColumnPtr> evaluate_checked(ExprContext* context, Chunk* chunk) override {
auto&& status = _children[0]->evaluate_checked(context, chunk);
if (LIKELY(!status.ok())) {
return ColumnHelper::create_const_null_column(chunk->num_rows());
}
return status;
if (LIKELY(status.ok())) {
return status;
}
return ColumnHelper::create_const_null_column(chunk->num_rows());
}

Expr* clone(ObjectPool* pool) const override { return pool->add(new TryExpr(*this)); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public boolean isNullable() {

@Override
public Expr clone() {
return new TryExpr(this);
return new TryExpr(getChild(0).clone(), pos);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ public int hashCode() {

@Override
public boolean equals(Object other) {
return this == other;
if (this == other) return true;
if (other == null || getClass() != other.getClass()) return false;
TryOperator that = (TryOperator) other;
return Objects.equals(arguments, that.arguments);
}

@Override
public <R, C> R accept(ScalarOperatorVisitor<R, C> visitor, C context) {
System.out.println("================");
return visitor.visitTryOperator(this, context);
}

Expand Down

0 comments on commit 8dbecf5

Please sign in to comment.