arrow.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright 2022 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. // [Deprecated] The count of rows in `serialized_record_batch`.
  37. // Please use the format-independent ReadRowsResponse.row_count instead.
  38. int64 row_count = 2 [deprecated = true];
  39. }
  40. // Contains options specific to Arrow Serialization.
  41. message ArrowSerializationOptions {
  42. // Compression codec's supported by Arrow.
  43. enum CompressionCodec {
  44. // If unspecified no compression will be used.
  45. COMPRESSION_UNSPECIFIED = 0;
  46. // LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md)
  47. LZ4_FRAME = 1;
  48. // Zstandard compression.
  49. ZSTD = 2;
  50. }
  51. // The compression codec to use for Arrow buffers in serialized record
  52. // batches.
  53. CompressionCodec buffer_compression = 2;
  54. }