Skip to content

Conversation

@tswast
Copy link
Collaborator

@tswast tswast commented Oct 9, 2025

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> 🦕

@tswast tswast requested review from a team as code owners October 9, 2025 18:57
@tswast tswast requested a review from shuoweil October 9, 2025 18:57
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Oct 9, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Oct 9, 2025
@tswast tswast changed the title fix: blob.display() shows <NA> for null rows fix: blob.display() shows <NA> for null rows Oct 9, 2025
@shuoweil
Copy link
Contributor

Please check failed testcases. Thanks a lot.

@tswast
Copy link
Collaborator Author

tswast commented Oct 10, 2025

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

@shuoweil
Copy link
Contributor

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

I would suggest we rebase main and try to run system tests again.

@tswast
Copy link
Collaborator Author

tswast commented Oct 14, 2025

@shuoweil All tests are passing.

@shuoweil shuoweil merged commit ddb4df0 into main Oct 14, 2025
25 checks passed
@shuoweil shuoweil deleted the tswast-cover branch October 14, 2025 18:57
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