You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
1.8 KiB

  1. syntax = "proto3";
  2. package columnar_pb;
  3. option go_package = "github.com/seaweedfs/seaweedfs/weed/data/columnar_pb";
  4. message FileId {
  5. uint32 volume_id = 1;
  6. uint64 file_key = 2;
  7. fixed32 cookie = 3;
  8. }
  9. enum LogicalType {
  10. Uint8 = 0;
  11. Uint16 = 1;
  12. Float32 = 4;
  13. }
  14. message ColumnUint16 {
  15. uint32 base = 1;
  16. uint32 min = 3;
  17. uint32 max = 4;
  18. }
  19. message ColumnUint32 {
  20. uint32 base = 1;
  21. uint32 min = 3;
  22. uint32 max = 4;
  23. }
  24. message ColumnFloat32 {
  25. uint32 min = 3;
  26. uint32 max = 4;
  27. }
  28. message ColumnSplit {
  29. // The ids of the fields/columns in this file
  30. int32 field_id = 1;
  31. FileId file_id = 2;
  32. int64 row_offset = 3;
  33. int32 row_count = 4;
  34. oneof storage_type {
  35. ColumnUint16 meta_uint16 = 8;
  36. ColumnUint32 meta_uint32 = 9;
  37. ColumnFloat32 meta_float32 = 10;
  38. }
  39. }
  40. message Snapshot {
  41. // All fields of the dataset, including the nested fields.
  42. repeated Field fields = 1;
  43. repeated string data_files = 2;
  44. // Snapshot version number.
  45. uint64 version = 3;
  46. }
  47. message DataFile {
  48. repeated int32 field_ids = 1;
  49. repeated RowGroup row_groups = 2;
  50. }
  51. message RowGroup {
  52. int64 row_offset = 1;
  53. int32 row_count = 2;
  54. repeated ColumnSplit column_splits = 3;
  55. }
  56. // Field metadata for a column.
  57. message Field {
  58. enum Type {
  59. PARENT = 0;
  60. REPEATED = 1;
  61. LEAF = 2;
  62. }
  63. Type type = 1;
  64. // Fully qualified name.
  65. string name = 2;
  66. /// Field Id.
  67. int32 id = 3;
  68. /// Parent Field ID. If not set, this is a top-level column.
  69. int32 parent_id = 4;
  70. // Logical types, support parameterized Arrow Type.
  71. LogicalType logical_type = 5;
  72. // If this field is nullable.
  73. bool nullable = 6;
  74. }
  75. message AnyValue {
  76. oneof value {
  77. bytes bytes_value = 1;
  78. bool bool_value = 2;
  79. uint64 int64_value = 3;
  80. uint32 int32_value = 4;
  81. double double_value = 5;
  82. }
  83. }