You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: merge.rs
    path of file: ./repos/delta-rs/crates/benchmarks/src/bin
    
    the code of the file until where you have to start completion: use std::{
    sync::Arc,
    time::{SystemTime, UNIX_EPOCH},
};

use arrow::datatypes::Schema as ArrowSchema;
use arrow_array::{RecordBatch, StringArray, UInt32Array};
use chrono::Duration;
use clap::{command, Args, Parser, Subcommand};
use datafusion::{datasource::MemTable, prelude::DataFrame};
use datafusion_common::DataFusionError;
use datafusion_expr::{cast, col, lit, random};
use deltalake_core::protocol::SaveMode;
use deltalake_core::{
    arrow::{
        self,
        datatypes::{DataType, Field},
    },
    datafusion::prelude::{CsvReadOptions, SessionContext},
    delta_datafusion::{DeltaScanConfig, DeltaTableProvider},
    operations::merge::{MergeBuilder, MergeMetrics},
    DeltaOps, DeltaTable, DeltaTableBuilder, DeltaTableError, ObjectStore, Path,
};
use serde_json::json;
use tokio::time::Instant;

/* Convert web_returns dataset from TPC DS's datagen utility into a Delta table
   This table will be partitioned on `wr_returned_date_sk`
*/
pub async fn convert_tpcds_web_returns(input_path: String, table_path: String) -> Result<(), ()> {
    let ctx = SessionContext::new();

    let schema = ArrowSchema::new(vec![
        Field::new("wr_returned_date_sk", DataType::Int64, true),
        Field::new("wr_returned_time_sk", DataType::Int64, true),
        Field::new("wr_item_sk", DataType::Int64, false),
        Field::new("wr_refunded_customer_sk", DataType::Int64, true),
        Field::new("wr_refunded_cdemo_sk", DataType::Int64, true),
        Field::new("wr_refunded_hdemo_sk", Da
    
fn merge_insert(source: DataFrame, table: DeltaTable) -> Result<MergeBuilder, DeltaTableError> {
    DeltaOps(table)
        .merge(source, "source.wr_item_sk = target.wr_item_sk and source.wr_order_number = target.wr_order_number")
        .with_source_alias("source")
        .with_target_alias("target")
        .when_not_matched_insert(|insert| {
            insert
            .set("wr_returned_date_sk", "source.wr_returned_date_sk")
            .set("wr_returned_time_sk", "source.wr_returned_time_sk")
            .set("wr_item_sk", "source.wr_item_sk")
            .set("wr_refunded_customer_sk", "source.wr_refunded_customer_sk")
            .set("wr_refunded_cdemo_sk", "source.wr_refunded_cdemo_sk")
            .set("wr_refunded_hdemo_sk", "source.wr_refunded_hdemo_sk")
            .set("wr_refunded_addr_sk", "source.wr_refunded_addr_sk")
            .set("wr_returning_customer_sk", "source.wr_returning_customer_sk")
            .set("wr_returning_cdemo_sk", "source.wr_returning_cdemo_sk")
            .set("wr_returning_hdemo_sk", "source.wr_returning_hdemo_sk")
            .set("wr_returning_addr_sk", "source.wr_returning_addr_sk")
            .set("wr_web_page_sk", "source.wr_web_page_sk")
            .set("wr_reason_sk", "source.wr_reason_sk")
            .set("wr_order_number", "source.wr_order_number")
            .set("wr_return_quantity", "source.wr_return_quantity")
            .set("wr_return_amt", "source.wr_return_amt")
            .set("wr_return_tax", "source.wr_return_tax")
            .set("wr_return_amt_inc_tax", "source.wr_return_amt_inc_tax")
            .set("wr_fee", "source.wr_fee")
            .set("wr_return_ship_cost", "source.wr_return_ship_cost")
            .set("wr_refunded_cash", "source.wr_refunded_cash")
            .set("wr_reversed_charge", "source.wr_reversed_charge")
            .set("wr_account_credit", "source.wr_account_credit")
            .set("wr_net_loss", "source.wr_net_loss")
        })
}