pub async fn compact(
    executor: &Executor,
    data: Arc<QueryableBatch>,
) -> Result<SendableRecordBatchStream> {
    // Build logical plan for compaction
    let ctx = executor.new_context(ExecutorType::Reorg);
    let logical_plan = ReorgPlanner::new()
        .scan_single_chunk_plan(data.schema(), data)
        .context(LogicalPlanSnafu {})?;

    // Build physical plan
    let physical_plan = ctx
        .prepare_plan(&logical_plan)
        .await
        .context(PhysicalPlanSnafu {})?;

    // Execute the plan and return the compacted stream
    let output_stream = ctx
        .execute_stream(physical_plan)
        .await
        .context(ExecutePlanSnafu {})?;
    Ok(output_stream)
}
/// Compact the given Ingester's data
/// Note: the given `executor` should be created  with the IngesterServer
Compact the given Ingester's data
Note: the given `executor` should be created  with the IngesterServer
Compact the given Ingester ' s data Note : the given ` executor ` should be created with the IngesterServer
pub async fn compact(
    executor: &Executor,
    data: Arc<QueryableBatch>,
) -> Result<SendableRecordBatchStream> {
    // Build logical plan for compaction
    let ctx = executor.new_context(ExecutorType::Reorg);
    let logical_plan = ReorgPlanner::new()
        .scan_single_chunk_plan(data.schema(), data)
        .context(LogicalPlanSnafu {})?;
    // Build physical plan
    let physical_plan = ctx
        .prepare_plan(&logical_plan)
        .await
        .context(PhysicalPlanSnafu {})?;
    // Execute the plan and return the compacted stream
    let output_stream = ctx
        .execute_stream(physical_plan)
        .await
        .context(ExecutePlanSnafu {})?;
    Ok(output_stream)
}
pub async fn compact ( executor : & Executor , data : Arc < QueryableBatch > , ) -> Result < SendableRecordBatchStream > { // Build logical plan for compaction let ctx = executor . new_context ( ExecutorType :: Reorg ) ; let logical_plan = ReorgPlanner :: new ( ) . scan_single_chunk_plan ( data . schema ( ) , data ) . context ( LogicalPlanSnafu { } ) ? ; // Build physical plan let physical_plan = ctx . prepare_plan ( & logical_plan ) . await . context ( PhysicalPlanSnafu { } ) ? ; // Execute the plan and return the compacted stream let output_stream = ctx . execute_stream ( physical_plan ) . await . context ( ExecutePlanSnafu { } ) ? ; Ok ( output_stream ) }
Compact the given Ingester's data
Note: the given `executor` should be created  with the IngesterServer
Compact the given Ingester ' s data Note : the given ` executor ` should be created with the IngesterServer
executor
&Executor
data
Arc<QueryableBatch>
executor
&Executor
data
Arc<QueryableBatch>