|
30 | 30 | import pyarrow as pa |
31 | 31 |
|
32 | 32 | from bigframes.core import utils |
33 | | -import bigframes.core.compile.aggregate_compiler as agg_compiler |
34 | 33 | import bigframes.core.compile.googlesql |
| 34 | +import bigframes.core.compile.ibis_compiler.aggregate_compiler as agg_compiler |
| 35 | +import bigframes.core.compile.ibis_compiler.scalar_op_compiler as op_compilers |
35 | 36 | import bigframes.core.compile.ibis_types |
36 | | -import bigframes.core.compile.scalar_op_compiler as op_compilers |
37 | | -import bigframes.core.compile.scalar_op_compiler as scalar_op_compiler |
38 | 37 | import bigframes.core.expression as ex |
39 | 38 | from bigframes.core.ordering import OrderingExpression |
40 | 39 | import bigframes.core.sql |
@@ -460,7 +459,7 @@ def project_window_op( |
460 | 459 | for column in inputs: |
461 | 460 | clauses.append((column.isnull(), ibis_types.null())) |
462 | 461 | if window_spec.min_periods and len(inputs) > 0: |
463 | | - if expression.op.skips_nulls: |
| 462 | + if not expression.op.nulls_count_for_min_values: |
464 | 463 | # Most operations do not count NULL values towards min_periods |
465 | 464 | per_col_does_count = (column.notnull() for column in inputs) |
466 | 465 | # All inputs must be non-null for observation to count |
@@ -679,13 +678,15 @@ def _join_condition( |
679 | 678 |
|
680 | 679 |
|
681 | 680 | def _as_groupable(value: ibis_types.Value): |
| 681 | + from bigframes.core.compile.ibis_compiler import scalar_op_registry |
| 682 | + |
682 | 683 | # Some types need to be converted to another type to enable groupby |
683 | 684 | if value.type().is_float64(): |
684 | 685 | return value.cast(ibis_dtypes.str) |
685 | 686 | elif value.type().is_geospatial(): |
686 | 687 | return typing.cast(ibis_types.GeoSpatialColumn, value).as_binary() |
687 | 688 | elif value.type().is_json(): |
688 | | - return scalar_op_compiler.to_json_string(value) |
| 689 | + return scalar_op_registry.to_json_string(value) |
689 | 690 | else: |
690 | 691 | return value |
691 | 692 |
|
|
0 commit comments