alamb commented on code in PR #2261:
URL: https://github.com/apache/arrow-datafusion/pull/2261#discussion_r853481992
##########
datafusion/core/src/row/layout.rs:
##########
@@ -50,13 +118,23 @@ fn type_width(dt: &DataType) -> usize {
}
}
+fn word_aligned_offsets(null_width: usize, schema: &Arc<Schema>) ->
(Vec<usize>, usize) {
+ let mut offsets = vec![];
+ let mut offset = null_width;
+ for _ in schema.fields() {
+ offsets.push(offset);
+ offset += 8; // a 8-bytes word for each field
Review Comment:
Sorry -- I should have been clearer -- what I think is important is that the
code will assert / fail in some obvious way if/when someone decides to add
`DataType::Decimal` support in the future. I don't think we actually need to
support any additional sizes now, I am just thinking of our future selves (or
some other new contributor) trying to debug a partial field overwrite because
the fields were too small 🤯
--
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]