Skip to content

Commit 65eb8b3

Browse files
Merge remote-tracking branch 'github/main' into executor_write_api
2 parents e867248 + a634e97 commit 65eb8b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+950
-185
lines changed

bigframes/bigquery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
from bigframes.bigquery._operations.search import create_vector_index, vector_search
6161
from bigframes.bigquery._operations.sql import sql_scalar
6262
from bigframes.bigquery._operations.struct import struct
63-
from bigframes.core import log_adapter
63+
from bigframes.core.logging import log_adapter
6464

6565
_functions = [
6666
# approximate aggregate ops

bigframes/bigquery/_operations/ai.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
from bigframes import clients, dataframe, dtypes
2727
from bigframes import pandas as bpd
2828
from bigframes import series, session
29-
from bigframes.core import convert, log_adapter
29+
from bigframes.core import convert
30+
from bigframes.core.logging import log_adapter
3031
from bigframes.ml import core as ml_core
3132
from bigframes.operations import ai_ops, output_schemas
3233

bigframes/bigquery/_operations/ml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import google.cloud.bigquery
2121
import pandas as pd
2222

23-
import bigframes.core.log_adapter as log_adapter
23+
import bigframes.core.logging.log_adapter as log_adapter
2424
import bigframes.core.sql.ml
2525
import bigframes.dataframe as dataframe
2626
import bigframes.ml.base

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,19 @@ def _(left: TypedExpr, right: TypedExpr) -> sge.Expression:
140140
return sge.Coalesce(this=left.expr, expressions=[right.expr])
141141

142142

143+
@register_binary_op(ops.BinaryRemoteFunctionOp, pass_op=True)
144+
def _(
145+
left: TypedExpr, right: TypedExpr, op: ops.BinaryRemoteFunctionOp
146+
) -> sge.Expression:
147+
routine_ref = op.function_def.routine_ref
148+
# Quote project, dataset, and routine IDs to avoid keyword clashes.
149+
func_name = (
150+
f"`{routine_ref.project}`.`{routine_ref.dataset_id}`.`{routine_ref.routine_id}`"
151+
)
152+
153+
return sge.func(func_name, left.expr, right.expr)
154+
155+
143156
@register_nary_op(ops.case_when_op)
144157
def _(*cases_and_outputs: TypedExpr) -> sge.Expression:
145158
# Need to upcast BOOL to INT if any output is numeric

bigframes/core/groupby/dataframe_group_by.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
from bigframes import session
2727
from bigframes.core import agg_expressions
2828
from bigframes.core import expression as ex
29-
from bigframes.core import log_adapter
3029
import bigframes.core.block_transforms as block_ops
3130
import bigframes.core.blocks as blocks
3231
from bigframes.core.groupby import aggs, group_by, series_group_by
32+
from bigframes.core.logging import log_adapter
3333
import bigframes.core.ordering as order
3434
import bigframes.core.utils as utils
3535
import bigframes.core.validations as validations

bigframes/core/groupby/series_group_by.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
from bigframes import session
2727
from bigframes.core import expression as ex
28-
from bigframes.core import log_adapter
2928
import bigframes.core.block_transforms as block_ops
3029
import bigframes.core.blocks as blocks
3130
from bigframes.core.groupby import aggs, group_by
31+
from bigframes.core.logging import log_adapter
3232
import bigframes.core.ordering as order
3333
import bigframes.core.utils as utils
3434
import bigframes.core.validations as validations

bigframes/core/logging/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from bigframes.core.logging import log_adapter
16+
17+
__all__ = ["log_adapter"]

bigframes/core/window/rolling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
from bigframes import dtypes
2525
from bigframes.core import agg_expressions
2626
from bigframes.core import expression as ex
27-
from bigframes.core import log_adapter, ordering, utils, window_spec
27+
from bigframes.core import ordering, utils, window_spec
2828
import bigframes.core.blocks as blocks
29+
from bigframes.core.logging import log_adapter
2930
from bigframes.core.window import ordering as window_ordering
3031
import bigframes.operations.aggregations as agg_ops
3132

bigframes/dataframe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
import bigframes.constants
5757
import bigframes.core
58-
from bigframes.core import agg_expressions, log_adapter
58+
from bigframes.core import agg_expressions
5959
import bigframes.core.block_transforms as block_ops
6060
import bigframes.core.blocks as blocks
6161
import bigframes.core.convert
@@ -66,6 +66,7 @@
6666
import bigframes.core.indexers as indexers
6767
import bigframes.core.indexes as indexes
6868
import bigframes.core.interchange
69+
from bigframes.core.logging import log_adapter
6970
import bigframes.core.ordering as order
7071
import bigframes.core.utils as utils
7172
import bigframes.core.validations as validations

0 commit comments

Comments
 (0)