Skip to content

[data] Zero-sized blocks crashes write_bigquery #51892

@FredrikNoren

Description

@FredrikNoren

What happened + What you expected to happen

Here: https://github.com/ray-project/ray/blob/master/python/ray/data/_internal/datasource/bigquery_datasink.py#L79

We need to add:

            if block.num_rows == 0: return

Otherwise we're getting:

google.api_core.exceptions.BadRequest: 400 Table testy_embeddings_d6c21277_8ef5_4ed7_9c85_304fb04ed6fe_source does not have a schema.; reason: invalid, message: Table testy_embeddings_d6c21277_8ef5_4ed7_9c85_304fb04ed6fe_source does not have a schema.

Versions / Dependencies

Ray 2.44.1

Reproduction script

Filter out everything in a dataset and try to write it to bigquery

Issue Severity

High: It blocks me from completing my task.

Metadata

Metadata

Labels

P0Issues that should be fixed in short orderbugSomething that is supposed to be working; but isn'tcommunity-backlogdataRay Data-related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions