@@ -74,7 +74,11 @@ service RerunCloudService {
74
74
// Search a previously created index.
75
75
rpc SearchDataset (SearchDatasetRequest ) returns (stream SearchDatasetResponse ) {}
76
76
77
- // Perform Rerun-native queries on a dataset, returning the matching chunk IDs.
77
+ // Perform Rerun-native queries on a dataset, returning the matching chunk IDs, as well
78
+ // as information that can be sent back to Rerun Cloud to fetch the actual chunks as part
79
+ // of `FetchChunks` request. In this 2-step query process, 1st step is getting information
80
+ // from the server about the chunks that contain relevant information. 2nd step is fetching
81
+ // those chunks (the actual data).
78
82
//
79
83
// These Rerun-native queries include:
80
84
// * Filtering by specific partition and chunk IDs.
@@ -96,6 +100,13 @@ service RerunCloudService {
96
100
// To fetch only the actual chunk IDs rather than the chunks themselves, see `QueryDataset`.
97
101
rpc GetChunks (GetChunksRequest ) returns (stream GetChunksResponse ) {}
98
102
103
+ // Fetch specific chunks from Rerun Cloud. In a 2-step query process, result of 1st phase,
104
+ // that is, the result of `QueryDataset` should include all the necessary information to send
105
+ // the actual chunk requests, which is the 2nd step of the query process.
106
+ //
107
+ // See `FetchChunksRequest` for details on the fields that describe each individual chunk.
108
+ rpc FetchChunks (FetchChunksRequest ) returns (stream FetchChunksResponse ) {}
109
+
99
110
// --- Tables ---
100
111
// TODO(jleibs): This will be replaced / extended by Arrow Flight
101
112
@@ -533,6 +544,21 @@ message GetChunksResponse {
533
544
repeated rerun.log_msg.v1alpha1.ArrowMsg chunks = 1 ;
534
545
}
535
546
547
+ message FetchChunksRequest {
548
+ // Information about the chunks to fetch. These dataframes have to include the following columns:
549
+ // * `chunk_id` - Chunk unique identifier
550
+ // * `partition_id` - partition this chunk belongs to. Currently needed as we pass this metadata back and forth
551
+ // * `partition_layer` - specific partition layer. Currently needed as we pass this metadata back and forth
552
+ // * `chunk_key` - chunk location details
553
+ repeated rerun.common.v1alpha1.DataframePart chunk_infos = 1 ;
554
+ }
555
+
556
+ message FetchChunksResponse {
557
+ // Every gRPC response, even within the confines of a stream, involves HTTP2 overhead, which isn't
558
+ // cheap by any means, which is why we're returning a batch of `ArrowMsg` rather than a single one.
559
+ repeated rerun.log_msg.v1alpha1.ArrowMsg chunks = 1 ;
560
+ }
561
+
536
562
// --- Table Apis ---
537
563
538
564
message GetTableSchemaRequest {
0 commit comments