alamb commented on code in PR #2261:
URL: https://github.com/apache/arrow-datafusion/pull/2261#discussion_r854092749
##########
datafusion/core/src/row/layout.rs:
##########
@@ -109,20 +121,24 @@ fn compact_type_width(dt: &DataType) -> usize {
fn word_aligned_offsets(null_width: usize, schema: &Schema) -> (Vec<usize>,
usize) {
let mut offsets = vec![];
let mut offset = null_width;
- for _ in schema.fields() {
+ for f in schema.fields() {
offsets.push(offset);
- offset += 8; // a 8-bytes word for each field
+ assert!(!matches!(f.data_type(), DataType::Decimal(_, _)));
Review Comment:
👍
##########
datafusion/core/src/row/jit/mod.rs:
##########
@@ -92,85 +93,190 @@ mod tests {
fn_test_single_type!(
BooleanArray,
Boolean,
- vec![Some(true), Some(false), None, Some(true), None]
+ vec![Some(true), Some(false), None, Some(true), None],
+ Compact
+ );
+
+ fn_test_single_type!(
+ BooleanArray,
+ Boolean,
+ vec![Some(true), Some(false), None, Some(true), None],
+ WordAligned
Review Comment:
👌 very nice
--
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]