diff --git a/bigframes/core/compile/aggregate_compiler.py b/bigframes/core/compile/aggregate_compiler.py index 7059c4fdc1..9c1db0f162 100644 --- a/bigframes/core/compile/aggregate_compiler.py +++ b/bigframes/core/compile/aggregate_compiler.py @@ -414,7 +414,7 @@ def _( result = _is_true(column).any() return cast( ibis_types.BooleanScalar, - _apply_window_if_present(result, window).fillna(ibis_types.literal(True)), + _apply_window_if_present(result, window).fillna(ibis_types.literal(False)), ) diff --git a/tests/system/small/test_index.py b/tests/system/small/test_index.py index 2961884ebf..1f39ba25fe 100644 --- a/tests/system/small/test_index.py +++ b/tests/system/small/test_index.py @@ -68,6 +68,10 @@ def test_index_has_duplicates(scalars_df_index, scalars_pandas_df_index): assert bf_result == pd_result +def test_index_empty_has_duplicates(): + assert not bpd.Index([]).has_duplicates + + def test_index_values(scalars_df_index, scalars_pandas_df_index): bf_result = scalars_df_index.index.values pd_result = scalars_pandas_df_index.index.values