pub fn execute_input_stream(
    input: Arc<dyn ExecutionPlan>,
    sink_schema: SchemaRef,
    partition: usize,
    context: Arc<TaskContext>,
) -> Result<SendableRecordBatchStream>
Expand description

Executes an input stream and ensures that the resulting stream adheres to the not null constraints specified in the sink_schema.

§Arguments

  • input - An execution plan
  • sink_schema - The schema to be applied to the output stream
  • partition - The partition index to be executed
  • context - The task context

§Returns

  • Result<SendableRecordBatchStream> - A stream of RecordBatches if successful

This function first executes the given input plan for the specified partition and context. It then checks if there are any columns in the input that might violate the not null constraints specified in the sink_schema. If there are such columns, it wraps the resulting stream to enforce the not null constraints by invoking the check_not_null_contraits function on each batch of the stream.