Skip to content

Commit c7e55e2

Browse files
committed
address comments
1 parent c99acc9 commit c7e55e2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bigframes/core/compile/sqlglot/expressions/timedelta_ops.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,5 @@ def _(expr: TypedExpr, op: ops.ToTimedeltaOp) -> sge.Expression:
4040
if factor != 1:
4141
value = sge.Mul(this=value, expression=sge.convert(factor))
4242
if expr.dtype == dtypes.FLOAT_DTYPE:
43-
value = sge.Floor(this=value)
44-
if expr.dtype != dtypes.INT_DTYPE:
45-
value = sge.Cast(this=value, to=sge.DataType(this="INT64"))
43+
value = sge.Cast(this=sge.Floor(this=value), to=sge.DataType(this="INT64"))
4644
return value

0 commit comments

Comments
 (0)