leekeiabstraction opened a new issue, #186: URL: https://github.com/apache/fluss-rust/issues/186
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fluss-rust/issues) and found nothing similar. ### Description Currently for Kv delete, we have to fill the non-primary key field. We can introduce a method such as GenericRow::new(field_count: usize) just like java side. The default is null, but user can set the field. Then, for delete, users just need to do the following ```rust let mut row = GenericRow::new(3); row.set_field(0, 2) ``` However we need to be mindful of changing current GenericRow behaviour. We currently use insert for set_field. This results in field count mismatch if the GenericRow was created with the right number of fields to start with. This issue should include refactoring in places that maybe affected by `new()` and `set_field()` behaviour change ```rust impl<'a> Default for GenericRow<'a> { fn default() -> Self { Self::new() } } impl<'a> GenericRow<'a> { ... pub fn new() -> GenericRow<'a> { GenericRow { values: vec![] } } ... pub fn set_field(&mut self, pos: usize, value: impl Into<Datum<'a>>) { self.values.insert(pos, value.into()); } } ``` I think we should change Generic row as per your suggestion, but that means a lot of changes in other places where we're already calling new() or default() ### Willingness to contribute - [ ] I'm willing to submit a PR! -- 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]
