Skip to content

Commit 89a66dd

Browse files
fix sqlglot compiler too
1 parent 65efa9b commit 89a66dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def _(expr: TypedExpr) -> sge.Expression:
7878

7979
@register_unary_op(ops.MapOp, pass_op=True)
8080
def _(expr: TypedExpr, op: ops.MapOp) -> sge.Expression:
81+
if len(op.mappings) == 0:
82+
return expr.expr
8183
return sge.Case(
8284
this=expr.expr,
8385
ifs=[

0 commit comments

Comments
 (0)