use crate::distributed_array::merge::ArrayAggPartial;
use crate::distributed_array::wire::{ArrayShardAggReq, ArrayShardPutReq, ArrayShardSliceReq};
use crate::error::Result;
#[async_trait::async_trait]
pub trait ArrayLocalExecutor: Send + Sync + 'static {
async fn exec_slice(&self, req: &ArrayShardSliceReq) -> Result<Vec<Vec<u8>>>;
async fn exec_surrogate_bitmap_scan(
&self,
array_id_msgpack: &[u8],
slice_msgpack: &[u8],
) -> Result<Vec<u8>>;
async fn exec_agg(&self, req: &ArrayShardAggReq) -> Result<Vec<ArrayAggPartial>>;
async fn exec_put(&self, req: &ArrayShardPutReq) -> Result<u64>;
async fn exec_delete(
&self,
array_id_msgpack: &[u8],
coords_msgpack: &[u8],
wal_lsn: u64,
) -> Result<u64>;
}