feat: support write data via influxdb line protocol in frontend (#280)

* feat: support influxdb line protocol write
This commit is contained in:
fys
2022-09-29 17:08:08 +08:00
committed by GitHub
parent ed89cc3e21
commit fe8327fc78
24 changed files with 1131 additions and 15 deletions

View File

@@ -67,12 +67,10 @@ pub fn insertion_expr_to_request(
}
fn insert_batches(bytes_vec: Vec<Vec<u8>>) -> Result<Vec<InsertBatch>> {
let mut insert_batches = Vec::with_capacity(bytes_vec.len());
for bytes in bytes_vec {
insert_batches.push(bytes.deref().try_into().context(DecodeInsertSnafu)?);
}
Ok(insert_batches)
bytes_vec
.iter()
.map(|bytes| bytes.deref().try_into().context(DecodeInsertSnafu))
.collect()
}
fn add_values_to_builder(

View File

@@ -129,7 +129,6 @@ macro_rules! convert_arrow_array_to_grpc_vals {
_ => unimplemented!(),
}
};
}
pub fn values(arrays: &[Arc<dyn Array>]) -> Result<Values> {