Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 47a8af3

Browse files
fix isin struct ics
1 parent cd5579b commit 47a8af3

File tree

3 files changed

+6
-6
lines changed
  • bigframes/core/compile/sqlglot
  • tests/unit/core/compile/sqlglot/snapshots
    • test_compile_isin/test_compile_isin
    • test_compile_join/test_compile_join_w_on/float64_col

3 files changed

+6
-6
lines changed

bigframes/core/compile/sqlglot/sqlglot_ir.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ def isin_join(
357357
or conditions[1].dtype == dtypes.FLOAT_DTYPE
358358
):
359359
force_float_domain = True
360-
part1_id = sql.identifier(next(self.uid_gen.get_uid_stream("bfpart1_")))
361-
part2_id = sql.identifier(next(self.uid_gen.get_uid_stream("bfpart2_")))
360+
part1_id = sql.identifier("bfpart1")
361+
part2_id = sql.identifier("bfpart2")
362362
left_expr1, left_expr2 = _value_to_non_null_identity(
363363
conditions[0], force_float_domain
364364
)

tests/unit/core/compile/sqlglot/snapshots/test_compile_isin/test_compile_isin/out.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ WITH `bfcte_0` AS (
2020
), `bfcte_4` AS (
2121
SELECT
2222
*,
23-
STRUCT(COALESCE(`bfcol_4`, 0) AS `bfpart1_0`, COALESCE(`bfcol_4`, 1) AS `bfpart2_0`) IN (
23+
STRUCT(COALESCE(`bfcol_4`, 0) AS `bfpart1`, COALESCE(`bfcol_4`, 1) AS `bfpart2`) IN (
2424
(
2525
SELECT
26-
STRUCT(COALESCE(`bfcol_0`, 0) AS `bfpart1_0`, COALESCE(`bfcol_0`, 1) AS `bfpart2_0`)
26+
STRUCT(COALESCE(`bfcol_0`, 0) AS `bfpart1`, COALESCE(`bfcol_0`, 1) AS `bfpart2`)
2727
FROM `bfcte_3`
2828
)
2929
) AS `bfcol_5`

tests/unit/core/compile/sqlglot/snapshots/test_compile_join/test_compile_join_w_on/float64_col/out.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ SELECT
2020
`bfcol_2` AS `rowindex_y`
2121
FROM `bfcte_2`
2222
INNER JOIN `bfcte_1`
23-
ON IF(IS_NAN(`bfcol_5`), 2, COALESCE(`bfcol_5`, 0)) = IF(IS_NAN(`bfcol_3`), 2, COALESCE(`bfcol_3`, 0))
24-
AND IF(IS_NAN(`bfcol_5`), 3, COALESCE(`bfcol_5`, 1)) = IF(IS_NAN(`bfcol_3`), 3, COALESCE(`bfcol_3`, 1))
23+
ON IF(IS_NAN(`bfcol_5`), 2.0, COALESCE(`bfcol_5`, 0.0)) = IF(IS_NAN(`bfcol_3`), 2.0, COALESCE(`bfcol_3`, 0.0))
24+
AND IF(IS_NAN(`bfcol_5`), 3, COALESCE(`bfcol_5`, 1.0)) = IF(IS_NAN(`bfcol_3`), 3, COALESCE(`bfcol_3`, 1.0))

0 commit comments

Comments
 (0)