Thalweg · API reference ← Main docs

validate_response

Function validate_response 

Source
pub fn validate_response(
    input_row_count: usize,
    output_batch: &RecordBatch,
    expected_return_type: &DataType,
) -> Result<(), ValidationError>
Expand description

Validate a worker response’s schema and row count against the contract.

The response must be a single column of expected_return_type with exactly input_row_count rows. Byte-size containment is enforced separately during streaming collection (see crate::remote::transport).

§Errors

Returns ValidationError::SchemaMismatch or ValidationError::RowCountMismatch on the first failing check.