Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

DATE and DOUBLE should support more input formats #1396

@burakgok

Description

@burakgok

The documentation states that for BigQuery data type DATE, protocol buffer types int32 and int64 are supported while the former is preferred. However, we found that int64 values are rejected by the Storage Write API because

  1. In BQTableSchemaToProtoDescriptor#49, BigQuery data type DATE is mapped to protocol buffer type INT32.
  2. In JsonToProtoMessage#272, Java data type Integer is expected for protocol buffer type INT32 and Java data type Long is ignored.

In addition, we could not understand why DATE fields do not support date literals, unlike DATETIME fields. In Standard SQL, both data types support date literals. You can also think the opposite way: Why does the Storage Write API not expect epoch microseconds for DATETIME fields while expecting epoch days for DATE fields?

Finally, JsonToProtoMessage does not convert Integer and Long into Double for DOUBLE fields although the conversion is absolutely safe.

Metadata

Metadata

Labels

api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions