qzyu999 commented on PR #474:
URL: https://github.com/apache/fluss-rust/pull/474#issuecomment-4204013926
> @qzyu999
>
> Thank you for the changes, I reviewed holistically, and I think we shall
go this way:
>
> * Drop FixedSizeList/LargeList. Server only accepts ListVector, so to
support this we need server-side changes first, which is out of scope.
> * Use nested ColumnWriter instead of ListBuilder<Box>. Type erasure forces
duplicating all builder creation in column_writer.rs. Nested ColumnWriter, on
the contrary, can reuse existing typed dispatch. e.g. store a Box for elements
inside the TypedWriter::List variant
> smth like this:
>
> ```rust
> /// element_writer - Box<ColumnWriter>
> TypedWriter::List { element_writer, offsets, non_null, .. } => {
> let array = row.get_array(pos)?;
> for i in 0..array.size() {
> if array.is_null_at(i) {
> element_writer.append_null();
> } else {
> element_writer.write_non_null_at(&array, i)?;
> }
> }
> offsets.push(i32::try_from(last + array.size())?);
> non_null.push(true);
> Ok(())
> }
> ```
>
> cc @leekeiabstraction @luoyuxia
Hi @fresh-borzoni, thanks for the suggestions, I've made the changes in the
latest set of commits: 704bcae, 29f43f1, 4c3cda8. 704bcae contains the main
changes, others are removing of references to FixedSizeList and LargeList.
Please let me know if any further changes are necessary.
--
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]