Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 7, 2026. It is now read-only.

fix: Fix too many cluster columns requested by caching#2155

Merged
TrevorBergeron merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
fix_cache_cluster_conflictgoogleapis/python-bigquery-dataframes:fix_cache_cluster_conflictCopy head branch name to clipboard
Oct 9, 2025
Merged

fix: Fix too many cluster columns requested by caching#2155
TrevorBergeron merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
fix_cache_cluster_conflictgoogleapis/python-bigquery-dataframes:fix_cache_cluster_conflictCopy head branch name to clipboard

Conversation

@TrevorBergeron

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@TrevorBergeron TrevorBergeron requested review from a team and sycai October 8, 2025 23:30
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Oct 8, 2025
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Oct 8, 2025
tswast
tswast previously approved these changes Oct 9, 2025
@tswast

tswast commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Test failure:

================================== FAILURES ===================================
________________________ test_df_cached_many_index_cols ________________________
[gw17] linux -- Python 3.9.20 /tmpfs/src/github/python-bigquery-dataframes/.nox/system-3-9/bin/python

scalars_df_index =           bool_col                                          bytes_col  \
rowindex                                     ...99999+00:00     0:00:00.000004  
8                                     <NA>    5 days, 0:00:00  

[9 rows x 14 columns]

    def test_df_cached_many_index_cols(scalars_df_index):
        index_cols = [
            "int64_too",
            "geography_col",
            "int64_col",
            "bool_col",
            "date_col",
            "timestamp_col",
            "string_col",
        ]
        df = scalars_df_index.set_index(index_cols)
        df = df[df["rowindex_2"] % 2 == 0]
    
        df_cached_copy = df.cache()
>       pandas.testing.assert_frame_equal(df.to_pandas(), df_cached_copy.to_pandas())

[tests/system/small/test_dataframe.py:5554](https://cs.corp.google.com/piper///depot/google3/tests/system/small/test_dataframe.py?l=5554): 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[bigframes/core/log_adapter.py:195](https://cs.corp.google.com/piper///depot/google3/bigframes/core/log_adapter.py?l=195): in wrapper
    raise e
[bigframes/core/log_adapter.py:180](https://cs.corp.google.com/piper///depot/google3/bigframes/core/log_adapter.py?l=180): in wrapper
    return method(*args, **kwargs)
[bigframes/dataframe.py:1870](https://cs.corp.google.com/piper///depot/google3/bigframes/dataframe.py?l=1870): in to_pandas
    df, query_job = self._block.to_pandas(
[bigframes/core/blocks.py:647](https://cs.corp.google.com/piper///depot/google3/bigframes/core/blocks.py?l=647): in to_pandas
    df = self._copy_index_to_pandas(df)
[bigframes/core/blocks.py:747](https://cs.corp.google.com/piper///depot/google3/bigframes/core/blocks.py?l=747): in _copy_index_to_pandas
    new_df.set_index(list(self.index_columns), inplace=True)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/util/_decorators.py:331](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/util/_decorators.py?l=331): in wrapper
    return func(*args, **kwargs)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/frame.py:6067](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/frame.py?l=6067): in set_index
    index = ensure_index_from_sequences(arrays, names)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/base.py:7274](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/base.py?l=7274): in ensure_index_from_sequences
    return MultiIndex.from_arrays(sequences, names=names)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/multi.py:489](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/multi.py?l=489): in from_arrays
    codes, levels = factorize_from_iterables(arrays)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py:3007](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py?l=3007): in factorize_from_iterables
    codes, categories = zip(*(factorize_from_iterable(it) for it in iterables))
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py:3007](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py?l=3007): in <genexpr>
    codes, categories = zip(*(factorize_from_iterable(it) for it in iterables))
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py:2980](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py?l=2980): in factorize_from_iterable
    cat = Categorical(values, ordered=False)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py:454](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/arrays/categorical.py?l=454): in __init__
    dtype = CategoricalDtype(categories, dtype.ordered)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py:186](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py?l=186): in __init__
    self._finalize(categories, ordered, fastpath=False)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py:340](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py?l=340): in _finalize
    categories = self.validate_categories(categories, fastpath=fastpath)
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py:536](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/dtypes/dtypes.py?l=536): in validate_categories
    if not categories.is_unique:
[pandas/_libs/properties.pyx:36](https://cs.corp.google.com/piper///depot/google3/pandas/_libs/properties.pyx?l=36): in pandas._libs.properties.CachedProperty.__get__
    ???
[.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/base.py:2386](https://cs.corp.google.com/piper///depot/google3/.nox/system-3-9/lib/python3.9/site-packages/pandas/core/indexes/base.py?l=2386): in is_unique
    return self._engine.is_unique
[pandas/_libs/index.pyx:225](https://cs.corp.google.com/piper///depot/google3/pandas/_libs/index.pyx?l=225): in pandas._libs.index.IndexEngine.is_unique.__get__
    ???
[pandas/_libs/index.pyx:232](https://cs.corp.google.com/piper///depot/google3/pandas/_libs/index.pyx?l=232): in pandas._libs.index.IndexEngine._do_unique_check
    ???
[pandas/_libs/index.pyx:290](https://cs.corp.google.com/piper///depot/google3/pandas/_libs/index.pyx?l=290): in pandas._libs.index.IndexEngine._ensure_mapping_populated
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   TypeError: unhashable type: 'Point'

[pandas/_libs/hashtable_class_helper.pxi:5778](https://cs.corp.google.com/piper///depot/google3/pandas/_libs/hashtable_class_helper.pxi?l=5778): TypeError

@TrevorBergeron TrevorBergeron merged commit 35c1c33 into main Oct 9, 2025
21 of 25 checks passed
@TrevorBergeron TrevorBergeron deleted the fix_cache_cluster_conflict branch October 9, 2025 23:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.