Skip to content

Commit cc209e0

Browse files
authored
Merge branch 'main' into main_chelsealin_notebooks
2 parents b5a04a2 + 52b7786 commit cc209e0

File tree

5 files changed

+39
-4
lines changed

5 files changed

+39
-4
lines changed

‎CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44

55
[1]: https://pypi.org/project/bigframes/#history
66

7+
## [1.13.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v1.12.0...v1.13.0) (2024-08-05)
8+
9+
10+
### Features
11+
12+
* `df.apply(axis=1)` to support remote function with mutiple params ([#851](https://github.com/googleapis/python-bigquery-dataframes/issues/851)) ([2158818](https://github.com/googleapis/python-bigquery-dataframes/commit/2158818e53e09e55c87ffd574e3ebc2e201285fb))
13+
* Allow windowing in 'partial' ordering mode ([#861](https://github.com/googleapis/python-bigquery-dataframes/issues/861)) ([ca26fe5](https://github.com/googleapis/python-bigquery-dataframes/commit/ca26fe5f9edec519788c276a09eaff33ecd87434))
14+
* Create a separate OrderingModePartialPreviewWarning for more fine-grained warning filters ([#879](https://github.com/googleapis/python-bigquery-dataframes/issues/879)) ([8753bdd](https://github.com/googleapis/python-bigquery-dataframes/commit/8753bdd1e44701e56eae914ebc0e91d9b1a6adf1))
15+
16+
17+
### Bug Fixes
18+
19+
* Fix issue with invalid sql generated by ml distance functions ([#865](https://github.com/googleapis/python-bigquery-dataframes/issues/865)) ([9959fc8](https://github.com/googleapis/python-bigquery-dataframes/commit/9959fc8fcba93441fdd3d9c17e8fdbe6e6a7b504))
20+
21+
22+
### Documentation
23+
24+
* Create sample notebook using `ordering_mode="partial"` ([#880](https://github.com/googleapis/python-bigquery-dataframes/issues/880)) ([c415eb9](https://github.com/googleapis/python-bigquery-dataframes/commit/c415eb91eb71dea53d245ba2bce416062e3f02f8))
25+
* Update streaming notebook ([#875](https://github.com/googleapis/python-bigquery-dataframes/issues/875)) ([e9b0557](https://github.com/googleapis/python-bigquery-dataframes/commit/e9b05571123cf13079772856317ca3cd3d564c5a))
26+
727
## [1.12.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v1.11.1...v1.12.0) (2024-07-31)
828

929

‎bigframes/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def head(self, n: int = 5) -> Series:
641641
def tail(self, n: int = 5) -> Series:
642642
return typing.cast(Series, self.iloc[-n:])
643643

644-
def peek(self, n: int = 5, *, force: bool = True) -> pandas.DataFrame:
644+
def peek(self, n: int = 5, *, force: bool = True) -> pandas.Series:
645645
"""
646646
Preview n arbitrary elements from the series without guarantees about row selection or ordering.
647647

‎bigframes/session/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,8 +1997,10 @@ def _cache_with_session_awareness(self, array_value: core.ArrayValue) -> None:
19971997
)
19981998
if len(cluster_cols) > 0:
19991999
self._cache_with_cluster_cols(core.ArrayValue(target), cluster_cols)
2000-
else:
2000+
elif self._strictly_ordered:
20012001
self._cache_with_offsets(core.ArrayValue(target))
2002+
else:
2003+
self._cache_with_cluster_cols(core.ArrayValue(target), [])
20022004

20032005
def _simplify_with_caching(self, array_value: core.ArrayValue):
20042006
"""Attempts to handle the complexity by caching duplicated subtrees and breaking the query into pieces."""

‎bigframes/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "1.12.0"
15+
__version__ = "1.13.0"

‎tests/system/small/test_unordered.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919

2020
import bigframes.exceptions
2121
import bigframes.pandas as bpd
22-
from tests.system.utils import assert_pandas_df_equal, skip_legacy_pandas
22+
from tests.system.utils import (
23+
assert_pandas_df_equal,
24+
assert_series_equal,
25+
skip_legacy_pandas,
26+
)
2327

2428

2529
def test_unordered_mode_sql_no_hash(unordered_session):
@@ -51,6 +55,15 @@ def test_unordered_mode_cache_aggregate(unordered_session):
5155
assert_pandas_df_equal(bf_result, pd_result, ignore_order=True)
5256

5357

58+
def test_unordered_mode_series_peek(unordered_session):
59+
pd_series = pd.Series([1, 2, 3, 4, 5, 6], dtype=pd.Int64Dtype())
60+
bf_series = bpd.Series(pd_series, session=unordered_session)
61+
pd_result = pd_series.groupby(pd_series % 4).sum()
62+
bf_peek = bf_series.groupby(bf_series % 4).sum().peek(2)
63+
64+
assert_series_equal(bf_peek, pd_result.reindex(bf_peek.index))
65+
66+
5467
def test_unordered_mode_single_aggregate(unordered_session):
5568
pd_df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]}, dtype=pd.Int64Dtype())
5669
bf_df = bpd.DataFrame(pd_df, session=unordered_session)

0 commit comments

Comments
 (0)