Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Dec 10, 2024
1 parent 1e1c77f commit 9f77629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion pandas_gbq/schema/pyarrow_to_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def arrow_type_to_bigquery_field(name, type_) -> Optional[schema.SchemaField]:
else:
return schema.SchemaField(name, "TIMESTAMP")


detected_type = _ARROW_SCALAR_IDS_TO_BQ.get(type_.id, None)
if detected_type is not None:
return schema.SchemaField(name, detected_type)
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/schema/test_pyarrow_to_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

from google.cloud import bigquery
import pyarrow
import pytest

from google.cloud import bigquery
from pandas_gbq.schema import pyarrow_to_bigquery


Expand Down Expand Up @@ -34,7 +34,9 @@
),
)
def test_arrow_type_to_bigquery_field_scalar_types(pyarrow_type, bigquery_type):
field: bigquery.SchemaField = pyarrow_to_bigquery.arrow_type_to_bigquery_field("test_name", pyarrow_type)
field: bigquery.SchemaField = pyarrow_to_bigquery.arrow_type_to_bigquery_field(
"test_name", pyarrow_type
)
assert field.name == "test_name"
assert field.field_type == bigquery_type

Expand Down

0 comments on commit 9f77629

Please sign in to comment.