Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sycai
Copy link
Contributor

@sycai sycai commented Sep 15, 2025

b/443853093

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Sep 15, 2025
@sycai sycai marked this pull request as ready for review September 16, 2025 17:13
@sycai sycai requested review from a team as code owners September 16, 2025 17:13

if item.dtype == dtypes.OBJ_REF_DTYPE:
# Multi-model support
item = item.blob.read_url()
Copy link
Contributor

@chelsea-lin chelsea-lin Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the pd.Series be converted into a series.Series represented for multi-model? I would suggest to have two IF branches: one for pd.Series and another one for. series.Series, for more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

series conversions happens at the bottom of the function body at line 157

This if branch is just to grab the session from the first BigFrames session

def _convert_series(
s: series.Series | pd.Series, session: session.Session | None
) -> series.Series:
result = convert.to_bf_series(s, default_index=None, session=session)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when two series.Series have two different sessions, should we throw an error here?

Copy link
Contributor Author

@sycai sycai Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to leave that check to the place where we "align" series:

values, block = self._align_n(
others, ignore_self=ignore_self, cast_scalars=False
)

@sycai sycai requested a review from chelsea-lin September 16, 2025 20:38
chelsea-lin
chelsea-lin previously approved these changes Sep 16, 2025
@sycai sycai requested a review from chelsea-lin September 17, 2025 21:49
@sycai sycai merged commit a3de53f into main Sep 17, 2025
20 of 25 checks passed
@sycai sycai deleted the sycai_ai_gen_bool_pandas branch September 17, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants