@@ -248,11 +248,13 @@ message CreateReadSessionRequest {
248248 // Max initial number of streams. If unset or zero, the server will
249249 // provide a value of streams so as to produce reasonable throughput. Must be
250250 // non-negative. The number of streams may be lower than the requested number,
251- // depending on the amount parallelism that is reasonable for the table. Error
252- // will be returned if the max count is greater than the current system
253- // max limit of 1,000.
251+ // depending on the amount parallelism that is reasonable for the table.
252+ // There is a default system max limit of 1,000.
254253 //
255- // Streams must be read starting from offset 0.
254+ // This must be greater than or equal to preferred_min_stream_count.
255+ // Typically, clients should either leave this unset to let the system to
256+ // determine an upper bound OR set this a size for the maximum "units of work"
257+ // it can gracefully handle.
256258 int32 max_stream_count = 3 ;
257259}
258260
@@ -329,7 +331,7 @@ message ReadRowsResponse {
329331
330332 // The schema for the read. If read_options.selected_fields is set, the
331333 // schema may be different from the table schema as it will only contain
332- // the selected fields. This schema is equivelant to the one returned by
334+ // the selected fields. This schema is equivalent to the one returned by
333335 // CreateSession. This field is only populated in the first ReadRowsResponse
334336 // RPC.
335337 oneof schema {
@@ -488,6 +490,11 @@ message AppendRowsResponse {
488490 // use it to input new type of message. It will be empty when no schema
489491 // updates have occurred.
490492 TableSchema updated_schema = 3 ;
493+
494+ // If a request failed due to corrupted rows, no rows in the batch will be
495+ // appended. The API will return row level error info, so that the caller can
496+ // remove the bad rows and retry the request.
497+ repeated RowError row_errors = 4 ;
491498}
492499
493500// Request message for `GetWriteStreamRequest`.
@@ -622,3 +629,24 @@ message StorageError {
622629 // Message that describes the error.
623630 string error_message = 3 ;
624631}
632+
633+ // The message that presents row level error info in a request.
634+ message RowError {
635+ // Error code for `RowError`.
636+ enum RowErrorCode {
637+ // Default error.
638+ ROW_ERROR_CODE_UNSPECIFIED = 0 ;
639+
640+ // One or more fields in the row has errors.
641+ FIELDS_ERROR = 1 ;
642+ }
643+
644+ // Index of the malformed row in the request.
645+ int64 index = 1 ;
646+
647+ // Structured error reason for a row error.
648+ RowErrorCode code = 2 ;
649+
650+ // Description of the issue encountered when processing the row.
651+ string message = 3 ;
652+ }
0 commit comments