We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83591f2 commit ee7be9aCopy full SHA for ee7be9a
bigframes/core/compile/sqlglot/expressions/date_ops.py
@@ -61,7 +61,8 @@ def _(expr: TypedExpr) -> sge.Expression:
61
62
# Helpers
63
def dayofweek_op_impl(expr: TypedExpr) -> sge.Expression:
64
- # Adjust the 1-based day-of-week index (from SQL) to a 0-based index.
+ # 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.
66
extract_expr = sge.Extract(
67
this=sge.Identifier(this="DAYOFWEEK"), expression=expr.expr
68
)
0 commit comments