Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit ee7be9a

Browse files
committed
update code comments
1 parent 83591f2 commit ee7be9a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def _(expr: TypedExpr) -> sge.Expression:
6161

6262
# Helpers
6363
def dayofweek_op_impl(expr: TypedExpr) -> sge.Expression:
64-
# Adjust the 1-based day-of-week index (from SQL) to a 0-based index.
64+
# BigQuery SQL Extract(DAYOFWEEK) returns 1 for Sunday through 7 for Saturday.
65+
# We want 0 for Monday through 6 for Sunday to be compatible with Pandas.
6566
extract_expr = sge.Extract(
6667
this=sge.Identifier(this="DAYOFWEEK"), expression=expr.expr
6768
)

0 commit comments

Comments
 (0)