Skip to content

Commit 3ab4b5c

Browse files
committed
fix blob ops for multimodel tests
1 parent 95ac49f commit 3ab4b5c

File tree

2 files changed

+4
-4
lines changed
  • bigframes/core/compile/sqlglot/expressions
  • tests/unit/core/compile/sqlglot/expressions/snapshots/test_blob_ops/test_obj_get_access_url

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def _(expr: TypedExpr) -> sge.Expression:
2929
return sge.func("OBJ.FETCH_METADATA", expr.expr)
3030

3131

32-
@register_unary_op(ops.ObjGetAccessUrl)
33-
def _(expr: TypedExpr) -> sge.Expression:
34-
return sge.func("OBJ.GET_ACCESS_URL", expr.expr)
32+
@register_unary_op(ops.ObjGetAccessUrl, pass_op=True)
33+
def _(expr: TypedExpr, op: ops.ObjGetAccessUrl) -> sge.Expression:
34+
return sge.func("OBJ.GET_ACCESS_URL", expr.expr, sge.convert(op.mode))
3535

3636

3737
@register_binary_op(ops.obj_make_ref_op)

tests/unit/core/compile/sqlglot/expressions/snapshots/test_blob_ops/test_obj_get_access_url/out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ WITH `bfcte_0` AS (
1111
), `bfcte_2` AS (
1212
SELECT
1313
*,
14-
OBJ.GET_ACCESS_URL(`bfcol_4`) AS `bfcol_7`
14+
OBJ.GET_ACCESS_URL(`bfcol_4`, 'R') AS `bfcol_7`
1515
FROM `bfcte_1`
1616
), `bfcte_3` AS (
1717
SELECT

0 commit comments

Comments
 (0)