Skip to content

Commit 08a8ffa

Browse files
Update packages/bigframes/bigframes/core/compile/sqlglot/expressions/ai_ops.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent e22c4d5 commit 08a8ffa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/bigframes/bigframes/core/compile/sqlglot/expressions

packages/bigframes/bigframes/core/compile/sqlglot/expressions/ai_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ def _construct_named_args(op: ops.ScalarOp) -> list[sge.Kwarg]:
139139
expression=sge.JSON(this=sge.Literal.string(value)),
140140
)
141141
)
142-
elif field == "optimization_mode":
142+
elif field == "optimization_mode" and value is not None:
143143
args.append(
144144
sge.Kwarg(this=field, expression=sge.Literal.string(value.upper()))
145145
)
146-
elif field == "max_error_ratio":
146+
elif field == "max_error_ratio" and value is not None:
147147
args.append(sge.Kwarg(this=field, expression=sge.Literal.number(value)))
148148
elif field == "request_type":
149149
args.append(

0 commit comments

Comments
 (0)