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.

Refactor: Remove duplicate _has_json_arrow_type from loader.py#2221

Merged
shuoweil merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
shuowei-refactor-loader-apigoogleapis/python-bigquery-dataframes:shuowei-refactor-loader-apiCopy head branch name to clipboard
Nov 4, 2025
Merged

Refactor: Remove duplicate _has_json_arrow_type from loader.py#2221
shuoweil merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
shuowei-refactor-loader-apigoogleapis/python-bigquery-dataframes:shuowei-refactor-loader-apiCopy head branch name to clipboard

Conversation

@shuoweil

@shuoweil shuoweil commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

This PR eliminates a redundant function, _has_json_arrow_type, from bigframes/session/loader.py. The logic of this function is identical to bigframes.dtypes.contains_db_dtypes_json_arrow_type.

The call to the removed function within _validate_dtype_can_load has been updated to utilize the existing bigframes.dtypes.contains_db_dtypes_json_arrow_type.

This refactoring improves code maintainability and reduces duplication by centralizing the logic for checking JSON arrow types.

@shuoweil shuoweil requested a review from chelsea-lin November 1, 2025 21:15
@shuoweil shuoweil self-assigned this Nov 1, 2025
@shuoweil shuoweil requested review from a team November 1, 2025 21:15
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Nov 1, 2025

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@tswast

tswast commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Presubmit failures:

FAILED tests/system/small/blob/test_io.py::test_blob_create_from_uri_str - As...
FAILED tests/system/small/blob/test_io.py::test_blob_create_from_glob_path - ...
FAILED tests/system/small/blob/test_io.py::test_display_images - AssertionErr...
FAILED tests/system/small/blob/test_properties.py::test_blob_authorizer - Ass...
FAILED tests/system/small/blob/test_properties.py::test_blob_version - Assert...
FAILED tests/system/small/blob/test_properties.py::test_blob_metadata - Asser...
FAILED tests/system/small/blob/test_properties.py::test_blob_content_type - T...
FAILED tests/system/small/blob/test_properties.py::test_blob_md5_hash - TypeE...
FAILED tests/system/small/ml/test_multimodal_llm.py::test_multimodal_embedding_generator_predict_default_params_success
FAILED tests/system/small/blob/test_properties.py::test_blob_size - Assertion...
FAILED tests/system/small/blob/test_properties.py::test_blob_updated - Assert...
FAILED tests/system/small/bigquery/test_ai.py::test_ai_if_multi_model - asser...
FAILED tests/system/small/bigquery/test_ai.py::test_ai_classify_multi_model

These are all blob or ai related. I'll see if this is a recurring issue and file an issue to make these more robust.

@shuoweil

shuoweil commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

Presubmit failures:

FAILED tests/system/small/blob/test_io.py::test_blob_create_from_uri_str - As...
FAILED tests/system/small/blob/test_io.py::test_blob_create_from_glob_path - ...
FAILED tests/system/small/blob/test_io.py::test_display_images - AssertionErr...
FAILED tests/system/small/blob/test_properties.py::test_blob_authorizer - Ass...
FAILED tests/system/small/blob/test_properties.py::test_blob_version - Assert...
FAILED tests/system/small/blob/test_properties.py::test_blob_metadata - Asser...
FAILED tests/system/small/blob/test_properties.py::test_blob_content_type - T...
FAILED tests/system/small/blob/test_properties.py::test_blob_md5_hash - TypeE...
FAILED tests/system/small/ml/test_multimodal_llm.py::test_multimodal_embedding_generator_predict_default_params_success
FAILED tests/system/small/blob/test_properties.py::test_blob_size - Assertion...
FAILED tests/system/small/blob/test_properties.py::test_blob_updated - Assert...
FAILED tests/system/small/bigquery/test_ai.py::test_ai_if_multi_model - asser...
FAILED tests/system/small/bigquery/test_ai.py::test_ai_classify_multi_model

These are all blob or ai related. I'll see if this is a recurring issue and file an issue to make these more robust.

Thanks Tim. I have a feeling it is the bigquery change brings in this failure. I am the oncall this week. I am investigating for the it now.

@shuoweil shuoweil enabled auto-merge (squash) November 3, 2025 23:58
@shuoweil shuoweil disabled auto-merge November 4, 2025 00:10
@shuoweil shuoweil merged commit 2e2f119 into main Nov 4, 2025
25 checks passed
@shuoweil shuoweil deleted the shuowei-refactor-loader-api branch November 4, 2025 01:27
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.

3 participants

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