Skip to content

Commit 4a7a338

Browse files
impl(bq_driver): Picosecond Changes
1 parent eb3947e commit 4a7a338

16 files changed

Lines changed: 3434 additions & 173 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.bigquery.v2;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option go_package = "cloud.google.com/go/bigquery/v2/apiv2/bigquerypb;bigquerypb";
22+
option java_outer_classname = "DataFormatOptionsProto";
23+
option java_package = "com.google.cloud.bigquery.v2";
24+
25+
// Options for data format adjustments.
26+
message DataFormatOptions {
27+
// The API output format for a timestamp.
28+
enum TimestampOutputFormat {
29+
// Corresponds to default API output behavior, which is FLOAT64.
30+
TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED = 0;
31+
32+
// Timestamp is output as float64 seconds since Unix epoch.
33+
FLOAT64 = 1;
34+
35+
// Timestamp is output as int64 microseconds since Unix epoch.
36+
INT64 = 2;
37+
38+
// Timestamp is output as ISO 8601 String
39+
// ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ").
40+
ISO8601_STRING = 3;
41+
}
42+
43+
// Optional. Output timestamp as usec int64. Default is false.
44+
std::string timestamp_output_format;
45+
46+
// Optional. The API output format for a timestamp.
47+
// This offers more explicit control over the timestamp output format
48+
// as compared to the existing `use_int64_timestamp` option.
49+
TimestampOutputFormat timestamp_output_format = 3
50+
[(google.api.field_behavior) = OPTIONAL];
51+
}

0 commit comments

Comments
 (0)