fresh-borzoni commented on code in PR #220:
URL: https://github.com/apache/fluss-rust/pull/220#discussion_r2741046017
##########
crates/fluss/src/client/table/lookup.rs:
##########
@@ -187,26 +213,46 @@ impl<'a> Lookuper<'a> {
/// * `Err(Error)` - If the lookup fails
pub async fn lookup(&mut self, row: &dyn InternalRow) ->
Result<LookupResult<'_>> {
// todo: support batch lookup
- // Encode the key from the row
- let encoded_key = self.key_encoder.encode_key(row)?;
- let key_bytes = encoded_key.to_vec();
+ let pk_bytes = self.primary_key_encoder.encode_key(row)?.to_vec();
+ let bk_bytes = match &mut self.bucket_key_encoder {
+ Some(encoder) => &encoder.encode_key(row)?.to_vec(),
Review Comment:
Okay, borrow checker is smarter than I thought :)
But still why do we copy to return reference. Mb just `as_ref()`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]