Skip to content

Conversation

@shuoweil
Copy link
Contributor

@shuoweil shuoweil commented Nov 1, 2025

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 as code owners 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
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

@tswast
Copy link
Collaborator

tswast commented Nov 3, 2025

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
Copy link
Contributor Author

shuoweil commented Nov 3, 2025

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 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: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants