Skip to content

[Bug]: Type specification for generate_user_type_from_bq_schema has not been updated after adding selected_fields #29927

@potiuk

Description

@potiuk

What happened?

This change #28152 added selected_fields to the generate_user_type_from_bq_schema but it had not updated type specification in the comment and it fails when MyPy checks are applied to code that imports apache beam.

This change has been relased to pypi in 2.53.0 ~ 7 hours ago and our canary build started to fail then.

Example failure:

https://github.com/apache/airflow/actions/runs/7413671084/job/20173886274

/usr/local/lib/python3.8/site-packages/apache_beam/io/gcp/bigquery_schema_tools.py:56: error:
Type signature has too few arguments  [syntax]
    def generate_user_type_from_bq_schema(the_table_schema, selected_field...
    ^
Found 1 error in 1 file (checked 260 source files)
Error 1 returned

We are going to mitigate in our MyPy configuration so this is not a high priority issue, but others might experience the same so it might be worth fixing soon-ish.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions