fix import

main
Ziyang Hu 2 years ago
parent f82254b843
commit 064ded8d53

@ -245,8 +245,8 @@ impl<'s, S: Storage<'s>> Db<S> {
.iter()
.map(proc_col)
.try_collect()?;
let v_store =
handle.encode_val_for_store(&Tuple(vals), Default::default())?;
let v_store = handle
.encode_val_only_for_store(&Tuple(vals), Default::default())?;
tx.tx.put(&k_store, &v_store)?;
}
}
@ -340,8 +340,8 @@ impl<'s, S: Storage<'s>> Db<S> {
col.typing.coerce(DataValue::from(v))
})
.try_collect()?;
let v_store =
handle.encode_val_for_store(&Tuple(vals), Default::default())?;
let v_store = handle
.encode_val_only_for_store(&Tuple(vals), Default::default())?;
tx.tx.put(&k_store, &v_store)?;
}
}

@ -149,6 +149,15 @@ impl RelationHandle {
.unwrap();
Ok(ret)
}
pub(crate) fn encode_val_only_for_store(
&self,
tuple: &Tuple,
_span: SourceSpan,
) -> Result<Vec<u8>> {
let mut ret = self.encode_key_prefix(tuple.0.len());
tuple.0.serialize(&mut Serializer::new(&mut ret)).unwrap();
Ok(ret)
}
pub(crate) fn ensure_compatible(&self, inp: &InputRelationHandle) -> Result<()> {
let InputRelationHandle { metadata, .. } = inp;
// check that every given key is found and compatible

Loading…
Cancel
Save