arrow.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. syntax = "proto3";
  15. package google.cloud.bigquery.storage.v1;
  16. option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "ArrowProto";
  20. option java_package = "com.google.cloud.bigquery.storage.v1";
  21. option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1";
  22. // Arrow schema as specified in
  23. // https://arrow.apache.org/docs/python/api/datatypes.html
  24. // and serialized to bytes using IPC:
  25. // https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc
  26. //
  27. // See code samples on how this message can be deserialized.
  28. message ArrowSchema {
  29. // IPC serialized Arrow schema.
  30. bytes serialized_schema = 1;
  31. }
  32. // Arrow RecordBatch.
  33. message ArrowRecordBatch {
  34. // IPC-serialized Arrow RecordBatch.
  35. bytes serialized_record_batch = 1;
  36. // The count of rows in `serialized_record_batch`.
  37. int64 row_count = 2;
  38. }
  39. // Contains options specific to Arrow Serialization.
  40. message ArrowSerializationOptions {
  41. // Compression codec's supported by Arrow.
  42. enum CompressionCodec {
  43. // If unspecified no compression will be used.
  44. COMPRESSION_UNSPECIFIED = 0;
  45. // LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md)
  46. LZ4_FRAME = 1;
  47. // Zstandard compression.
  48. ZSTD = 2;
  49. }
  50. // The compression codec to use for Arrow buffers in serialized record
  51. // batches.
  52. CompressionCodec buffer_compression = 2;
  53. }