GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tests.system.reader.test_reader_dataframe: test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] failed · Issue #319 · googleapis/python-bigquery-storage

This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

tests.system.reader.test_reader_dataframe: test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] failed #319

Copy link
Copy link
Closed
Closed
tests.system.reader.test_reader_dataframe: test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] failed#319
Copy link
Labels
api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@flaky-bot
flaky-bot
bot
opened on Oct 3, 2021
Issue body actions

Note: #259 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: f5b5d77
buildURL: Build Status, Sponge
status: failed

Test output
client_and_types = (, )
project_id = 'precise-truck-742', data_format = 'AVRO'
expected_schema_type = 'avro_schema'
@pytest.mark.parametrize(
    "data_format,expected_schema_type",
    (("AVRO", "avro_schema"), ("ARROW", "arrow_schema")),
)
def test_read_rows_to_dataframe(
    client_and_types, project_id, data_format, expected_schema_type
):
    client, types = client_and_types
    read_session = types.ReadSession()
    read_session.table = "projects/{}/datasets/{}/tables/{}".format(
        "bigquery-public-data", "new_york_citibike", "citibike_stations"
    )
    read_session.data_format = data_format

    session = client.create_read_session(
        request={
            "parent": "projects/{}".format(project_id),
            "read_session": read_session,
            "max_stream_count": 1,
        }
    )
    schema_type = session._pb.WhichOneof("schema")
    assert schema_type == expected_schema_type

    stream = session.streams[0].name

    frame = client.read_rows(stream).to_dataframe(
        session, dtypes={"latitude": numpy.float16}
    )

    # Station ID is a required field (no nulls), so the datatype should always
    # be integer.
    assert frame.station_id.dtype.name == "int64"
    assert frame.latitude.dtype.name == "float16"
    assert frame.longitude.dtype.name == "float64"
  assert frame["name"].str.startswith("Central Park").any()

E AssertionError: assert False
E + where False = <bound method NDFrame._add_numeric_operations..any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool>()
E + where <bound method NDFrame._add_numeric_operations..any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool> = 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool.any
E + where 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool = <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>>('Central Park')
E + where <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>> = <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>.startswith
E + where <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60> = 0 Driggs Ave & N 9 St\n1 W 42 St & Dyer Ave\n2 University Pl & E 14 St\n3 ...Worth St\n552 W 15 St & 7 Ave\n553 E 16 St & Irving Pl\nName: name, Length: 554, dtype: object.str

tests/system/reader/test_reader_dataframe.py:95: AssertionError

Activity

  1. flaky-bot
    added
    flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Oct 3, 2021
  2. product-auto-label
    added
    api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.
    on Oct 3, 2021
  3. flaky-bot commented on Oct 4, 2021

    @flaky-bot
    flaky-botBot
    on Oct 4, 2021
    Author
    More actions

    Looks like this issue is flaky. 😟

    I'm going to leave this open and stop commenting.

    A human should fix and close this.


    When run at the same commit (f5b5d77), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

  4. flaky-bot
    added
    flakybot: flakyTells the Flaky Bot not to close or comment on this issue.
    on Oct 4, 2021
  5. meredithslota
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Oct 11, 2021
  6. tswast commented on Nov 11, 2021

    @tswast
    tswast
    on Nov 11, 2021
    Contributor
    More actions

    Rather strange failure.

    ____________ test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] _____________
    
    client_and_types = (<google.cloud.bigquery_storage_v1beta2.BigQueryReadClient object at 0x7f3e48efd280>, <module 'google.cloud.bigquery_s...beta2.types' from '/tmpfs/src/github/python-bigquery-storage/google/cloud/bigquery_storage_v1beta2/types/__init__.py'>)
    project_id = 'precise-truck-742', data_format = 'AVRO'
    expected_schema_type = 'avro_schema'
    
        @pytest.mark.parametrize(
            "data_format,expected_schema_type",
            (("AVRO", "avro_schema"), ("ARROW", "arrow_schema")),
        )
        def test_read_rows_to_dataframe(
            client_and_types, project_id, data_format, expected_schema_type
        ):
            client, types = client_and_types
            read_session = types.ReadSession()
            read_session.table = "projects/{}/datasets/{}/tables/{}".format(
                "bigquery-public-data", "new_york_citibike", "citibike_stations"
            )
            read_session.data_format = data_format
    
            session = client.create_read_session(
                request={
                    "parent": "projects/{}".format(project_id),
                    "read_session": read_session,
                    "max_stream_count": 1,
                }
            )
            schema_type = session._pb.WhichOneof("schema")
            assert schema_type == expected_schema_type
    
            stream = session.streams[0].name
    
            frame = client.read_rows(stream).to_dataframe(
                session, dtypes={"latitude": numpy.float16}
            )
    
            # Station ID is a required field (no nulls), so the datatype should always
            # be integer.
            assert frame.station_id.dtype.name == "int64"
            assert frame.latitude.dtype.name == "float16"
            assert frame.longitude.dtype.name == "float64"
    >       assert frame["name"].str.startswith("Central Park").any()
    E       AssertionError: assert False
    E        +  where False = <bound method NDFrame._add_numeric_operations.<locals>.any of 0      False\n1      False\n2      False\n3      False\n4   ...lse\n       ...  \n549    False\n550    False\n551    False\n552    False\n553    False\nName: name, Length: 554, dtype: bool>()
    E        +    where <bound method NDFrame._add_numeric_operations.<locals>.any of 0      False\n1      False\n2      False\n3      False\n4   ...lse\n       ...  \n549    False\n550    False\n551    False\n552    False\n553    False\nName: name, Length: 554, dtype: bool> = 0      False\n1      False\n2      False\n3      False\n4      False\n       ...  \n549    False\n550    False\n551    False\n552    False\n553    False\nName: name, Length: 554, dtype: bool.any
    E        +      where 0      False\n1      False\n2      False\n3      False\n4      False\n       ...  \n549    False\n550    False\n551    False\n552    False\n553    False\nName: name, Length: 554, dtype: bool = <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>>('Central Park')
    E        +        where <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>> = <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>.startswith
    E        +          where <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60> = 0               Driggs Ave & N 9 St\n1                W 42 St & Dyer Ave\n2           University Pl & E 14 St\n3         ...Worth St\n552                 W 15 St & 7 Ave\n553             E 16 St & Irving Pl\nName: name, Length: 554, dtype: object.str
    

    Seems like the bike stations table had some stations renamed or just temporarily unavailable.

    To avoid flakes, we should rewrite this system test to use a table that doesn't update as frequently.

  7. yoshi-automation
    added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    on Feb 9, 2022
  8. yoshi-automation
    added
    🚨This issue needs some love.
    on Apr 1, 2022
  9. meredithslota
    removed
    🚨This issue needs some love.
    on Apr 4, 2022
  10. meredithslota
    closed this as completedon Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.