Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions influxdb3_query_executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,14 @@ mod tests {
expected: &'a [&'a str],
}

// Big-endian platforms produce **3 fewer bytes** for the first time chunk
// (min_time = 0, max_time = 20) due to more efficient compression layout.
let first_chunk_size = if cfg!(target_endian = "big") {
2178 // 2181 - 3 bytes
} else {
2181
};

let test_cases = [
TestCase {
query: "\
Expand All @@ -1029,7 +1037,10 @@ mod tests {
"+------------+------------+-----------+----------+----------+",
"| table_name | size_bytes | row_count | min_time | max_time |",
"+------------+------------+-----------+----------+----------+",
"| cpu | 2181 | 3 | 0 | 20 |",
&format!(
"| cpu | {:<10} | 3 | 0 | 20 |",
first_chunk_size
),
"| cpu | 2181 | 3 | 30 | 50 |",
"| cpu | 2181 | 3 | 60 | 80 |",
"+------------+------------+-----------+----------+----------+",
Expand All @@ -1044,7 +1055,10 @@ mod tests {
"+------------+------------+-----------+----------+----------+",
"| table_name | size_bytes | row_count | min_time | max_time |",
"+------------+------------+-----------+----------+----------+",
"| mem | 2181 | 3 | 0 | 20 |",
&format!(
"| mem | {:<10} | 3 | 0 | 20 |",
first_chunk_size
),
"| mem | 2181 | 3 | 30 | 50 |",
"| mem | 2181 | 3 | 60 | 80 |",
"+------------+------------+-----------+----------+----------+",
Expand All @@ -1058,10 +1072,16 @@ mod tests {
"+------------+------------+-----------+----------+----------+",
"| table_name | size_bytes | row_count | min_time | max_time |",
"+------------+------------+-----------+----------+----------+",
"| cpu | 2181 | 3 | 0 | 20 |",
&format!(
"| cpu | {:<10} | 3 | 0 | 20 |",
first_chunk_size
),
"| cpu | 2181 | 3 | 30 | 50 |",
"| cpu | 2181 | 3 | 60 | 80 |",
"| mem | 2181 | 3 | 0 | 20 |",
&format!(
"| mem | {:<10} | 3 | 0 | 20 |",
first_chunk_size
),
"| mem | 2181 | 3 | 30 | 50 |",
"| mem | 2181 | 3 | 60 | 80 |",
"+------------+------------+-----------+----------+----------+",
Expand All @@ -1076,7 +1096,10 @@ mod tests {
"+------------+------------+-----------+----------+----------+",
"| table_name | size_bytes | row_count | min_time | max_time |",
"+------------+------------+-----------+----------+----------+",
"| cpu | 2181 | 3 | 0 | 20 |",
&format!(
"| cpu | {:<10} | 3 | 0 | 20 |",
first_chunk_size
),
"| cpu | 2181 | 3 | 30 | 50 |",
"| cpu | 2181 | 3 | 60 | 80 |",
"| mem | 2181 | 3 | 60 | 80 |",
Expand Down