Skip to content

Commit 123a50e

Browse files
committed
snapshot update
1 parent a217c20 commit 123a50e

File tree

2 files changed

+41
-10
lines changed
  • bigframes
  • tests/unit/core/compile/sqlglot/expressions/snapshots/test_binary_compiler/test_add_numeric

2 files changed

+41
-10
lines changed

bigframes/dataframe.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,8 +2288,13 @@ def _assign_scalar(self, label: str, value: Union[int, float, str]) -> DataFrame
22882288
def _assign_series_join_on_index(
22892289
self, label: str, series: bigframes.series.Series
22902290
) -> DataFrame:
2291+
# Only use block_identity_join for null indices
2292+
use_block_identity_join = (
2293+
self._block.index.nlevels == 0 and series._block.index.nlevels == 0
2294+
)
2295+
22912296
block, (get_column_left, get_column_right) = self._block.join(
2292-
series._block, how="left", block_identity_join=True
2297+
series._block, how="left", block_identity_join=use_block_identity_join
22932298
)
22942299

22952300
column_ids = [
Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1-
WITH `bfcte_0` AS (
1+
WITH `bfcte_1` AS (
22
SELECT
3-
`int64_col` AS `bfcol_0`,
4-
`rowindex` AS `bfcol_1`
3+
`rowindex` AS `bfcol_0`
54
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
6-
), `bfcte_1` AS (
5+
), `bfcte_4` AS (
6+
SELECT
7+
`bfcol_0` AS `bfcol_1`
8+
FROM `bfcte_1`
9+
), `bfcte_0` AS (
10+
SELECT
11+
`int64_col` AS `bfcol_2`,
12+
`rowindex` AS `bfcol_3`
13+
FROM `bigframes-dev`.`sqlglot_test`.`scalar_types`
14+
), `bfcte_2` AS (
715
SELECT
816
*,
9-
`bfcol_1` AS `bfcol_4`,
10-
`bfcol_0` + `bfcol_0` AS `bfcol_5`
17+
`bfcol_3` AS `bfcol_6`,
18+
`bfcol_2` AS `bfcol_7`,
19+
`bfcol_2` AS `bfcol_8`
1120
FROM `bfcte_0`
21+
), `bfcte_3` AS (
22+
SELECT
23+
*,
24+
`bfcol_7` + `bfcol_8` AS `bfcol_12`
25+
FROM `bfcte_2`
26+
), `bfcte_5` AS (
27+
SELECT
28+
`bfcol_6` AS `bfcol_13`,
29+
`bfcol_12` AS `bfcol_14`
30+
FROM `bfcte_3`
31+
), `bfcte_6` AS (
32+
SELECT
33+
*
34+
FROM `bfcte_4`
35+
LEFT JOIN `bfcte_5`
36+
ON COALESCE(`bfcol_1`, 0) = COALESCE(`bfcol_13`, 0)
37+
AND COALESCE(`bfcol_1`, 1) = COALESCE(`bfcol_13`, 1)
1238
)
1339
SELECT
14-
`bfcol_4` AS `rowindex`,
15-
`bfcol_5` AS `int64_col`
16-
FROM `bfcte_1`
40+
`bfcol_1` AS `rowindex`,
41+
`bfcol_14` AS `int64_col`
42+
FROM `bfcte_6`

0 commit comments

Comments
 (0)