• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 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
15syntax = "proto3";
16
17package google.cloud.bigquery.storage.v1beta2;
18
19option go_package = "cloud.google.com/go/bigquery/storage/apiv1beta2/storagepb;storagepb";
20option java_multiple_files = true;
21option java_outer_classname = "ArrowProto";
22option java_package = "com.google.cloud.bigquery.storage.v1beta2";
23
24// Arrow schema as specified in
25// https://arrow.apache.org/docs/python/api/datatypes.html
26// and serialized to bytes using IPC:
27// https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc
28//
29// See code samples on how this message can be deserialized.
30message ArrowSchema {
31  // IPC serialized Arrow schema.
32  bytes serialized_schema = 1;
33}
34
35// Arrow RecordBatch.
36message ArrowRecordBatch {
37  // IPC-serialized Arrow RecordBatch.
38  bytes serialized_record_batch = 1;
39}
40
41// Contains options specific to Arrow Serialization.
42message ArrowSerializationOptions {
43  // The IPC format to use when serializing Arrow streams.
44  enum Format {
45    // If unspecied the IPC format as of 0.15 release will be used.
46    FORMAT_UNSPECIFIED = 0;
47
48    // Use the legacy IPC message format as of Apache Arrow Release 0.14.
49    ARROW_0_14 = 1;
50
51    // Use the message format as of Apache Arrow Release 0.15.
52    ARROW_0_15 = 2;
53  }
54
55  // The Arrow IPC format to use.
56  Format format = 1;
57}
58