You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/27 16:44:12 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #2968: fix writer index out of bounds

comphead commented on code in PR #2968:
URL: https://github.com/apache/arrow-datafusion/pull/2968#discussion_r931283945


##########
datafusion/row/src/writer.rs:
##########
@@ -349,7 +349,7 @@ pub(crate) fn write_field_utf8(
     let from = from.as_any().downcast_ref::<StringArray>().unwrap();
     let s = from.value(row_idx);
     let new_width = to.current_width() + s.as_bytes().len();

Review Comment:
   > And in the `set_utf8` or `set_binary`, we can use
   > 
   > ```
   >         self.varlena_offset += (size + 8);
   >         self.varlena_width += (size +8);
   > ```
   > 
   > to update the offset and width.
   
   That was also my vision. But my concern here if we add 8 extra bytes per field, it may bloat the row size significantly?
   
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org