Skip to content

Commit 3b0af20

Browse files
authored
Apply suggestions from code review
1 parent 99afbda commit 3b0af20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bigframes/core/compile/ibis_compiler/scalar_op_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,4 @@ def isnanornull(arg):
277277

278278
@scalar_op_compiler.register_unary_op(numeric_ops.isfinite_op)
279279
def isfinite(arg):
280-
return arg.isinf().not_() & arg.isnan().not_()
280+
return arg.isinf().not_() & arg.isnan().not_() & arg.isnull().not_()

bigframes/core/compile/sqlglot/scalar_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,5 @@ def isnanornull(arg: TypedExpr) -> sge.Expression:
191191
@scalar_op_compiler.register_unary_op(numeric_ops.isfinite_op)
192192
def isfinite(arg: TypedExpr) -> sge.Expression:
193193
return sge.Not(
194-
this=sge.Or(this=sge.IsInf(this=arg.expr), right=sge.IsNan(this=arg.expr))
194+
this=sge.Or(this=sge.Is(this=expr.expr, expression=sge.Null()), right=sge.Or(this=sge.IsInf(this=arg.expr), right=sge.IsNan(this=arg.expr))
195195
)

0 commit comments

Comments
 (0)