Skip to content

Commit 0818981

Browse files
authored
Merge branch 'main' into feat/migrate-unary-rf
2 parents 508b017 + a634e97 commit 0818981

Some content is hidden

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

43 files changed

+554
-173
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/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

bigframes/display/table_widget.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,27 @@ function render({ model, el }) {
170170
model.save_changes();
171171
}
172172

173+
let isHeightInitialized = false;
174+
173175
function handleTableHTMLChange() {
174176
tableContainer.innerHTML = model.get(ModelProperty.TABLE_HTML);
175177

178+
// After the first render, dynamically set the container height to fit the
179+
// initial page (usually 10 rows) and then lock it.
180+
setTimeout(() => {
181+
if (!isHeightInitialized) {
182+
const table = tableContainer.querySelector('table');
183+
if (table) {
184+
const tableHeight = table.offsetHeight;
185+
// Add a small buffer(e.g. 2px) for borders to avoid scrollbars.
186+
if (tableHeight > 0) {
187+
tableContainer.style.height = `${tableHeight + 2}px`;
188+
isHeightInitialized = true;
189+
}
190+
}
191+
}
192+
}, 0);
193+
176194
const sortableColumns = model.get(ModelProperty.ORDERABLE_COLUMNS);
177195
const currentSortContext = model.get(ModelProperty.SORT_CONTEXT) || [];
178196

0 commit comments

Comments
 (0)