This is an automated email from the ASF dual-hosted git repository.
yaooqinn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 33be6fb8bf [VL][TEST] Pin framedSerializeWithStats cross-language wire
format (#12196)
33be6fb8bf is described below
commit 33be6fb8bf703ac16eae3c75efa919a97d9cdf5a
Author: Kent Yao <[email protected]>
AuthorDate: Mon Jun 1 18:35:49 2026 +0800
[VL][TEST] Pin framedSerializeWithStats cross-language wire format (#12196)
* [VL][TEST] Pin framedSerializeWithStats cross-language wire format (cpp
side)
Add two cpp tests under VeloxColumnarBatchSerializerTest:
1. framedSerializeWithStatsGolden -- byte-equal golden frame pin for a
fixed deterministic 4-col / 100-row input (INTEGER + BIGINT + VARCHAR
+ BIGINT-det-0). 3198-byte literal captured from apache/incubator-gluten
main at ce6e16fe8f, determinism verified by 3 reruns md5-identical
(0f9c54179325b10f965b0dabe52f8749).
2. framedSerializeWithStatsAllNullColNoBounds -- FIELD-LEVEL no-bounds
branch test (emitSupported=0 path). Asserts supported=0, nullCount=
numRows, count=numRows, sizeInBytes=0 placeholder. Kept separate from
the byte-equal golden because Velox PrestoSerde dumps an all-null
FlatVector's uninitialized values buffer to the wire, making a
byte-equal golden over null cols non-deterministic across reruns.
Paired with a JVM-side test (separate commit) that feeds the same byte
literal through the parser for cross-language wire pin.
Generated-by: Claude claude-opus-4.7
* [VL][TEST] Pin framedSerializeWithStats cross-language wire format (JVM
side)
Append two tests to ColumnarCachedBatchFramedBytesSuite:
1. framedSerializeWithStats cross-language golden frame parse round-trip --
feeds the 3198-byte literal captured by the paired cpp test
(framedSerializeWithStatsGolden) through parseFramedBytes and asserts
decoded ColumnStats matches the expected 4-col / 100-row deterministic
input:
- col a INTEGER: lower=0, upper=99, count=100
- col b BIGINT: lower=-50, upper=49, count=100
- col c VARCHAR: lower=apple, upper=date, count=100
- col d BIGINT (deterministic 0): lower=0, upper=0, count=100
This pins the cpp<->JVM wire contract end-to-end.
2. framedSerializeWithStats emitSupported=0 no-bounds branch round-trip --
JVM-side mirror of cpp's framedSerializeWithStatsAllNullColNoBounds.
Crafts a synthetic 1-col no-bounds frame via serializeStats with
nulled lower/upper slots, asserts parser returns null bounds with
nullCount=count=rowCount.
Gated to Spark 4.x via assume(SparkShimLoader.getSparkVersion).
The cpp counterpart test header is the grep anchor; any intentional wire
format change requires updating both literals together in the same commit.
Generated-by: Claude claude-opus-4.7
* [VL][TEST] Expand statsBlob byte-for-byte coverage to 10 supported types
Append 8 byte-for-byte wire-format tests to
ColumnarCachedBatchStatsBlobSuite,
expanding existing BIGINT-only coverage to all 10 emitSupported=1 types
matching the cpp `emitSupported` allowlist in
VeloxColumnarBatchSerializer.cc:
- SMALLINT: 2B LE, lower=-32768/upper=32767 (sign-extension extremes)
- TINYINT: 1B, lower=-128/upper=127
- HUGEINT (DecimalType(20,0)): 16B LE int128 two's-complement,
lower=+1/upper=-1 (sign-extension extremes for long-decimal path)
- REAL: 4B LE bit-pattern via Float.floatToRawIntBits
- DOUBLE: 8B LE bit-pattern via Double.doubleToRawLongBits
- BOOLEAN: 1B 0/1
- TIMESTAMP: 8B LE micros (dispatched via LongType | TimestampType branch)
- DATE: 4B LE days-since-epoch (dispatched via IntegerType | DateType
branch)
Pairs with the cpp emitSupported allowlist tests and the JVM cross-language
golden round-trip in the preceding two commits. INTEGER / BIGINT / VARCHAR
already covered by the existing golden, and emitSupported=0 no-bounds branch
has dedicated cpp + JVM tests in the prior commits. With this commit, every
type kind in the dispatch table is wire-pinned.
Generated-by: Claude claude-opus-4.7
---
.../ColumnarCachedBatchFramedBytesSuite.scala | 312 +++++++++++++++++++++
.../ColumnarCachedBatchStatsBlobSuite.scala | 155 ++++++++++
.../tests/VeloxColumnarBatchSerializerTest.cc | 280 ++++++++++++++++++
3 files changed, 747 insertions(+)
diff --git
a/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchFramedBytesSuite.scala
b/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchFramedBytesSuite.scala
index 018aa880e1..bed1840447 100644
---
a/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchFramedBytesSuite.scala
+++
b/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchFramedBytesSuite.scala
@@ -16,8 +16,12 @@
*/
package org.apache.spark.sql.execution
+import org.apache.gluten.sql.shims.SparkShimLoader
+
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.GenericInternalRow
+import org.apache.spark.sql.types.{IntegerType, LongType, StringType,
StructField, StructType}
+import org.apache.spark.unsafe.types.UTF8String
import org.scalatest.funsuite.AnyFunSuite
@@ -97,4 +101,312 @@ class ColumnarCachedBatchFramedBytesSuite extends
AnyFunSuite {
CachedColumnarBatchKryoSerializer.parseFramedBytes(truncated, null)
}
}
+
+ // Cross-language golden frame paired with the cpp golden in
+ // cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
+ // TEST_F(VeloxColumnarBatchSerializerTest, framedSerializeWithStatsGolden)
+ // Same 3198-byte literal captured from apache/incubator-gluten main at
+ // ce6e16fe8f (determinism md5 0f9c54179325b10f965b0dabe52f8749 across
+ // 3 reruns). Pins the cross-language wire contract: feeding the cpp output
+ // through the JVM parser MUST produce expected stats fields.
+ //
+ // Update protocol on intentional wire bump: regenerate by capturing a fresh
+ // printf dump from the cpp side, paste BOTH literals in the SAME commit
+ // (cpp test name above is the grep anchor), and call out the bump in the PR.
+ //
+ // Spark 3.x is gated out: parseFramedBytes' schema-driven dispatch is
+ // Spark-4.x-only (V2 cache plan path).
+ private val kGoldenFrame: Array[Byte] = Array[Int](
+ 0xfe, 0xca, 0x53, 0x02, 0x99, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00,
0x00, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x64,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x61,
0x70, 0x70, 0x6c, 0x65,
+ 0x04, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x65, 0x01, 0x00, 0x00, 0x00,
0x00, 0x64, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xd9, 0x0b, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x04, 0xc4, 0x0b,
0x00, 0x00, 0xc4, 0x0b,
+ 0x00, 0x00, 0xf1, 0x94, 0x47, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x09, 0x00,
+ 0x00, 0x00, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x64,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x0b, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
0x13, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
0x17, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
0x1b, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x1f, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x23, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
0x27, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
0x2b, 0x00, 0x00, 0x00,
+ 0x2c, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
0x2f, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x33, 0x00, 0x00, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x37, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00,
0x3b, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
0x3f, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
0x43, 0x00, 0x00, 0x00,
+ 0x44, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00,
0x47, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00,
0x4b, 0x00, 0x00, 0x00,
+ 0x4c, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00,
0x4f, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
0x53, 0x00, 0x00, 0x00,
+ 0x54, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00,
0x57, 0x00, 0x00, 0x00,
+ 0x58, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
0x5b, 0x00, 0x00, 0x00,
+ 0x5c, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x5f, 0x00, 0x00, 0x00,
+ 0x60, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
0x63, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x4c, 0x4f, 0x4e, 0x47, 0x5f, 0x41, 0x52, 0x52,
0x41, 0x59, 0x64, 0x00,
+ 0x00, 0x00, 0x00, 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd3,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd7,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdb,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xde, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe5,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe9,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x56, 0x41, 0x52, 0x49, 0x41,
0x42, 0x4c, 0x45, 0x5f,
+ 0x57, 0x49, 0x44, 0x54, 0x48, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
0x00, 0x0b, 0x00, 0x00,
+ 0x00, 0x11, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00,
0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x26, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,
0x00, 0x35, 0x00, 0x00,
+ 0x00, 0x3b, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00,
0x00, 0x4a, 0x00, 0x00,
+ 0x00, 0x50, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00,
0x00, 0x5f, 0x00, 0x00,
+ 0x00, 0x65, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00,
0x00, 0x74, 0x00, 0x00,
+ 0x00, 0x7a, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00,
0x00, 0x89, 0x00, 0x00,
+ 0x00, 0x8f, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00,
0x00, 0x9e, 0x00, 0x00,
+ 0x00, 0xa4, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00,
0x00, 0xb3, 0x00, 0x00,
+ 0x00, 0xb9, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00,
0x00, 0xc8, 0x00, 0x00,
+ 0x00, 0xce, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00, 0xd7, 0x00, 0x00,
0x00, 0xdd, 0x00, 0x00,
+ 0x00, 0xe3, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00,
0x00, 0xf2, 0x00, 0x00,
+ 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
0x00, 0x07, 0x01, 0x00,
+ 0x00, 0x0d, 0x01, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x16, 0x01, 0x00,
0x00, 0x1c, 0x01, 0x00,
+ 0x00, 0x22, 0x01, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00, 0x2b, 0x01, 0x00,
0x00, 0x31, 0x01, 0x00,
+ 0x00, 0x37, 0x01, 0x00, 0x00, 0x3b, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00,
0x00, 0x46, 0x01, 0x00,
+ 0x00, 0x4c, 0x01, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x55, 0x01, 0x00,
0x00, 0x5b, 0x01, 0x00,
+ 0x00, 0x61, 0x01, 0x00, 0x00, 0x65, 0x01, 0x00, 0x00, 0x6a, 0x01, 0x00,
0x00, 0x70, 0x01, 0x00,
+ 0x00, 0x76, 0x01, 0x00, 0x00, 0x7a, 0x01, 0x00, 0x00, 0x7f, 0x01, 0x00,
0x00, 0x85, 0x01, 0x00,
+ 0x00, 0x8b, 0x01, 0x00, 0x00, 0x8f, 0x01, 0x00, 0x00, 0x94, 0x01, 0x00,
0x00, 0x9a, 0x01, 0x00,
+ 0x00, 0xa0, 0x01, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, 0xa9, 0x01, 0x00,
0x00, 0xaf, 0x01, 0x00,
+ 0x00, 0xb5, 0x01, 0x00, 0x00, 0xb9, 0x01, 0x00, 0x00, 0xbe, 0x01, 0x00,
0x00, 0xc4, 0x01, 0x00,
+ 0x00, 0xca, 0x01, 0x00, 0x00, 0xce, 0x01, 0x00, 0x00, 0xd3, 0x01, 0x00,
0x00, 0xd9, 0x01, 0x00,
+ 0x00, 0xdf, 0x01, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0xe8, 0x01, 0x00,
0x00, 0xee, 0x01, 0x00,
+ 0x00, 0xf4, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xfd, 0x01, 0x00,
0x00, 0x03, 0x02, 0x00,
+ 0x00, 0x09, 0x02, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x02,
0x00, 0x00, 0x61, 0x70,
+ 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65,
0x72, 0x72, 0x79, 0x64,
+ 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61,
0x6e, 0x61, 0x63, 0x68,
+ 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c,
0x65, 0x62, 0x61, 0x6e,
+ 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74,
0x65, 0x61, 0x70, 0x70,
+ 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72,
0x72, 0x79, 0x64, 0x61,
+ 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e,
0x61, 0x63, 0x68, 0x65,
+ 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65,
0x62, 0x61, 0x6e, 0x61,
+ 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65,
0x61, 0x70, 0x70, 0x6c,
+ 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72,
0x79, 0x64, 0x61, 0x74,
+ 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61,
0x63, 0x68, 0x65, 0x72,
+ 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62,
0x61, 0x6e, 0x61, 0x6e,
+ 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61,
0x70, 0x70, 0x6c, 0x65,
+ 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79,
0x64, 0x61, 0x74, 0x65,
+ 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63,
0x68, 0x65, 0x72, 0x72,
+ 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61,
0x6e, 0x61, 0x6e, 0x61,
+ 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70,
0x70, 0x6c, 0x65, 0x62,
+ 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64,
0x61, 0x74, 0x65, 0x61,
+ 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68,
0x65, 0x72, 0x72, 0x79,
+ 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e,
0x61, 0x6e, 0x61, 0x63,
+ 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70,
0x6c, 0x65, 0x62, 0x61,
+ 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61,
0x74, 0x65, 0x61, 0x70,
+ 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65,
0x72, 0x72, 0x79, 0x64,
+ 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61,
0x6e, 0x61, 0x63, 0x68,
+ 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c,
0x65, 0x62, 0x61, 0x6e,
+ 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74,
0x65, 0x61, 0x70, 0x70,
+ 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72,
0x72, 0x79, 0x64, 0x61,
+ 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e,
0x61, 0x63, 0x68, 0x65,
+ 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65,
0x62, 0x61, 0x6e, 0x61,
+ 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65,
0x61, 0x70, 0x70, 0x6c,
+ 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72,
0x79, 0x64, 0x61, 0x74,
+ 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62, 0x61, 0x6e, 0x61, 0x6e, 0x61,
0x63, 0x68, 0x65, 0x72,
+ 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x62,
0x61, 0x6e, 0x61, 0x6e,
+ 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x0a,
0x00, 0x00, 0x00, 0x4c,
+ 0x4f, 0x4e, 0x47, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x64, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
+ ).map(_.toByte)
+
+ test("framedSerializeWithStats cross-language golden frame parse
round-trip") {
+ assume(
+ SparkShimLoader.getSparkVersion.startsWith("4."),
+ "Schema-driven parseFramedBytes dispatch is Spark-4.x only")
+
+ val schema = StructType(
+ Seq(
+ StructField("a", IntegerType),
+ StructField("b", LongType),
+ StructField("c", StringType),
+ StructField("d", LongType)))
+
+ val (stats, bytesBlob) =
+ CachedColumnarBatchKryoSerializer.parseFramedBytes(kGoldenFrame, schema)
+
+ assert(stats !== null, "stats round-trip non-null")
+ assert(stats.numFields === 4 * 5, s"4 cols * 5 slots = 20 stats fields,
got ${stats.numFields}")
+
+ // Col a (INTEGER): rows 0..99, lower=0, upper=99, nullCount=0, count=100.
+ assert(stats.getInt(0) === 0, "col a INTEGER lower=0")
+ assert(stats.getInt(1) === 99, "col a INTEGER upper=99")
+ assert(stats.getInt(2) === 0, "col a nullCount=0")
+ assert(stats.getInt(3) === 100, "col a count=100")
+
+ // Col b (BIGINT): rows i-50, lower=-50, upper=49.
+ assert(stats.getLong(5) === -50L, "col b BIGINT lower=-50")
+ assert(stats.getLong(6) === 49L, "col b BIGINT upper=49")
+ assert(stats.getInt(7) === 0, "col b nullCount=0")
+ assert(stats.getInt(8) === 100, "col b count=100")
+
+ // Col c (VARCHAR): cycling apple/banana/cherry/date -> lex min=apple,
max=date.
+ assert(
+ stats.getUTF8String(10) === UTF8String.fromString("apple"),
+ "col c VARCHAR lower=apple")
+ assert(
+ stats.getUTF8String(11) === UTF8String.fromString("date"),
+ "col c VARCHAR upper=date")
+ assert(stats.getInt(12) === 0, "col c nullCount=0")
+ assert(stats.getInt(13) === 100, "col c count=100")
+
+ // Col d (BIGINT all-DETERMINISTIC-0): both bounds = 0, count=100,
nullCount=0.
+ // Intentionally NOT all-null: an all-null FlatVector poisons byte-equal
+ // goldens. emitSupported=0 coverage lives in the sibling no-bounds test
below.
+ assert(stats.getLong(15) === 0L, "col d BIGINT lower=0")
+ assert(stats.getLong(16) === 0L, "col d BIGINT upper=0")
+ assert(stats.getInt(17) === 0, "col d nullCount=0")
+ assert(stats.getInt(18) === 100, "col d count=100")
+
+ // Assert non-empty: catches a reader-side wire bump that empties bytesBlob
+ // without changing statsLen.
+ assert(bytesBlob.length > 0, "bytesBlob must be non-empty")
+ }
+
+ // Sibling no-bounds branch (emitSupported=0) coverage.
+ // Mirrors cpp's framedSerializeWithStatsAllNullColNoBounds. Crafts a
+ // synthetic 1-col no-bounds frame via serializeStats with nulled bounds
slots,
+ // then parses and asserts decoded ColumnStats carries no lower/upper bounds.
+ test("framedSerializeWithStats emitSupported=0 no-bounds branch round-trip")
{
+ assume(
+ SparkShimLoader.getSparkVersion.startsWith("4."),
+ "Schema-driven parseFramedBytes dispatch is Spark-4.x only")
+
+ // 1-col BIGINT, no bounds: slots 0/1 (lower/upper) null, nullCount=5,
count=5.
+ val noBoundsStats: InternalRow = new GenericInternalRow(
+ Array[Any](null, null, 5, 5, 0L))
+ val schema = StructType(Seq(StructField("d", LongType)))
+ val statsBlob =
CachedColumnarBatchKryoSerializer.serializeStats(noBoundsStats, schema)
+ val payload = Array[Byte](0xaa.toByte, 0xbb.toByte, 0xcc.toByte)
+ val framed = craftFramed(noBoundsStats, payload)
+
+ val (parsedStats, parsedBytes) =
+ CachedColumnarBatchKryoSerializer.parseFramedBytes(framed, schema)
+
+ assert(parsedBytes === payload, "bytesBlob round-trip exact")
+ assert(parsedStats !== null, "stats round-trip non-null")
+ assert(parsedStats.numFields === 5, "1 col * 5 slots = 5")
+ assert(parsedStats.isNullAt(0), "lower bound must be null (no-bounds
branch)")
+ assert(parsedStats.isNullAt(1), "upper bound must be null (no-bounds
branch)")
+ assert(parsedStats.getInt(2) === 5, "nullCount=rowCount=5")
+ assert(parsedStats.getInt(3) === 5, "count=5")
+ assert(parsedStats.getLong(4) === 0L, "sizeInBytes placeholder=0")
+
+ // statsBlob layout sanity: per-col header is 1B supported + 4B nullCount +
+ // 4B count + 8B sizeInBytes = 17 bytes; statsBlob = 4B numCols + 17 = 21.
+ assert(
+ statsBlob.length === 21,
+ s"no-bounds 1-col statsBlob length must be 21, got ${statsBlob.length}")
+ assert(statsBlob(4) === 0.toByte, "supported byte must be 0 (no-bounds
branch)")
+ }
+
}
diff --git
a/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchStatsBlobSuite.scala
b/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchStatsBlobSuite.scala
index 87b622a24c..69aebe6a0d 100644
---
a/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchStatsBlobSuite.scala
+++
b/backends-velox/src/test/scala/org/apache/spark/sql/execution/ColumnarCachedBatchStatsBlobSuite.scala
@@ -18,6 +18,9 @@ package org.apache.spark.sql.execution
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.GenericInternalRow
+import org.apache.spark.sql.types.{BooleanType, ByteType, DateType, Decimal,
DecimalType}
+import org.apache.spark.sql.types.{DoubleType, FloatType, ShortType,
TimestampType}
+import org.apache.spark.sql.types.{StructField, StructType}
import org.scalatest.funsuite.AnyFunSuite
@@ -99,4 +102,156 @@ class ColumnarCachedBatchStatsBlobSuite extends
AnyFunSuite {
assert(read.getInt(3) === 50)
assert(read.getLong(4) === 200L)
}
+
+ // SMALLINT: byte-for-byte wire pin.
+ // upperBound=32767 -> LE 0xFF 0x7F.
+ test("statsBlob SMALLINT cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any]((-32768).toShort, 32767.toShort, 0, 5, 10L))
+ val schema = StructType(Seq(StructField("a", ShortType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ // numCols=1 + supported=1 + nullCount=0 + count=5 + sizeInBytes=10 +
+ // lowerLen=2 + lowerBound=-32768 (LE 0x00 0x80) +
+ // upperLen=2 + upperBound=32767 (LE 0xFF 0x7F)
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
0x00, 0x0a, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80,
0x02, 0x00, 0x00,
+ 0x00, 0xff, 0x7f
+ ).map(_.toByte)
+ assert(blob === expected, "SMALLINT statsBlob byte-for-byte")
+ }
+
+ // TINYINT wrong upperBound byte (0x7E instead of 0x7F).
+ test("statsBlob TINYINT cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any]((-128).toByte, 127.toByte, 0, 3, 8L))
+ val schema = StructType(Seq(StructField("a", ByteType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ // numCols=1 + supported=1 + nullCount=0 + count=3 + sizeInBytes=8 +
+ // lowerLen=1 + lowerBound=-128 (0x80) +
+ // upperLen=1 + upperBound=127 (0x7F)
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x00,
+ 0x7f
+ ).map(_.toByte)
+ assert(blob === expected, "TINYINT statsBlob byte-for-byte")
+ }
+
+ // HUGEINT (16B LE int128, two's-complement). DecimalType(20,0) lower=1,
+ // upper=-1 exercises both sign-extension extremes. RED: wrong upper byte
0xFE.
+ test("statsBlob HUGEINT cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](Decimal(1L, 20, 0), Decimal(-1L, 20, 0), 0, 7, 32L))
+ val schema = StructType(Seq(StructField("a", DecimalType(20, 0))))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ // numCols=1 + supported=1 + nullCount=0 + count=7 + sizeInBytes=32 +
+ // lowerLen=16 + lower=+1 as int128 LE (01 then 15x00) +
+ // upperLen=16 + upper=-1 as int128 LE (16x FF)
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
+ 0xff
+ ).map(_.toByte)
+ assert(blob === expected, "HUGEINT statsBlob byte-for-byte")
+ }
+
+ // REAL (4B LE bit-pattern via Float.floatToRawIntBits).
+ // 1.5f -> 0x3FC00000 -> LE 00 00 C0 3F.
+ // -2.5f -> 0xC0200000 -> LE 00 00 20 C0.
+ test("statsBlob REAL cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](1.5f, -2.5f, 0, 2, 8L))
+ val schema = StructType(Seq(StructField("a", FloatType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x3f, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc0
+ ).map(_.toByte)
+ assert(blob === expected, "REAL statsBlob byte-for-byte")
+ }
+
+ // DOUBLE (8B LE bit-pattern via Double.doubleToRawLongBits).
+ // 1.5d -> 0x3FF8000000000000 -> LE 00 00 00 00 00 00 F8 3F.
+ // -2.5d -> 0xC004000000000000 -> LE 00 00 00 00 00 00 04 C0.
+ test("statsBlob DOUBLE cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](1.5d, -2.5d, 0, 2, 16L))
+ val schema = StructType(Seq(StructField("a", DoubleType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
+ 0x00, 0xf8, 0x3f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0xc0
+ ).map(_.toByte)
+ assert(blob === expected, "DOUBLE statsBlob byte-for-byte")
+ }
+
+ // BOOLEAN (1B 0/1). lower=false (0x00), upper=true (0x01).
+ test("statsBlob BOOLEAN cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](false, true, 0, 4, 1L))
+ val schema = StructType(Seq(StructField("a", BooleanType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ val expected = Array[Byte](
+ 0x01, 0x00, 0x00, 0x00,
+ 0x01,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00,
+ 0x00, // lower=false
+ 0x01, 0x00, 0x00, 0x00,
+ 0x01)
+ assert(blob === expected, "BOOLEAN statsBlob byte-for-byte")
+ }
+
+ // TIMESTAMP (8B LE micros via stats.getLong, dispatched via
+ // LongType | TimestampType branch). lower=1_000_000L (1s) -> LE
+ // 40 42 0F 00 00 00 00 00; upper=2_000_000L (2s) -> LE 80 84 1E 00 00 00 00
00.
+ test("statsBlob TIMESTAMP cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](1000000L, 2000000L, 0, 2, 16L))
+ val schema = StructType(Seq(StructField("a", TimestampType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ val expected = Array[Int](
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x42,
0x0f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x84, 0x1e, 0x00, 0x00,
0x00, 0x00, 0x00
+ ).map(_.toByte)
+ assert(blob === expected, "TIMESTAMP statsBlob byte-for-byte")
+ }
+
+ // DATE (4B LE days-since-epoch via stats.getInt, dispatched via
+ // IntegerType | DateType branch). lower=0 (1970-01-01); upper=20000 ->
+ // 0x00004E20 -> LE 20 4E 00 00.
+ test("statsBlob DATE cell round-trip byte-for-byte") {
+ val stats: InternalRow = new GenericInternalRow(
+ Array[Any](0, 20000, 0, 3, 8L))
+ val schema = StructType(Seq(StructField("a", DateType)))
+ val blob = CachedColumnarBatchKryoSerializer.serializeStats(stats, schema)
+
+ val expected = Array[Byte](
+ 0x01, 0x00, 0x00, 0x00,
+ 0x01,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00,
+ 0x20, 0x4e, 0x00, 0x00)
+ assert(blob === expected, "DATE statsBlob byte-for-byte")
+ }
+
}
diff --git a/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
b/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
index bdd16d930c..d51a9304ff 100644
--- a/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
+++ b/cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
@@ -743,4 +743,284 @@ TEST_F(VeloxColumnarBatchSerializerTest,
computeStatsDictEncodedNullCountReporte
<< "Dict-encoded vector with 2 nulls must report nullCount=2 (IsNull
prune correctness)";
}
+// Cross-language golden-frame pin.
+//
+// Asserts framedSerializeWithStats() emits a byte-identical frame for a fixed
+// deterministic 4-col / 100-row input.
+// Paired with
backends-velox/src/test/scala/.../ColumnarCachedBatchFramedBytesSuite
+// which feeds the SAME byte literal back through parseFramedBytes -- together
+// they pin the JVM<->cpp wire contract end-to-end. A Velox PrestoSerde wire
+// change OR a gluten stats-blob layout change will fire this test loudly.
+//
+// Input schema:
+// col a INTEGER -- 100 rows, value = i (i in [0,99])
+// col b BIGINT -- 100 rows, value = i - 50 (in [-50, 49])
+// col c VARCHAR -- 100 rows, cycling 4 fixed strings
("apple","banana","cherry","date")
+// col d BIGINT -- 100 rows, ALL NULL
+//
+// Update protocol: if Velox/gluten makes an intentional wire change,
regenerate
+// kGoldenFrame by capturing a fresh printf dump of the actual frame bytes, and
+// call out the wire bump explicitly in the PR description.
+TEST_F(VeloxColumnarBatchSerializerTest, framedSerializeWithStatsGolden) {
+ auto* arrowPool = getDefaultMemoryManager()->defaultArrowMemoryPool();
+ auto serializer = std::make_shared<VeloxColumnarBatchSerializer>(arrowPool,
pool_, nullptr);
+
+ constexpr int kRows = 100;
+ std::vector<int32_t> aVals(kRows);
+ std::vector<int64_t> bVals(kRows);
+ std::vector<StringView> cVals(kRows);
+ const StringView kStrings[4] = {StringView("apple"), StringView("banana"),
StringView("cherry"), StringView("date")};
+ for (int i = 0; i < kRows; ++i) {
+ aVals[i] = i;
+ bVals[i] = static_cast<int64_t>(i) - 50;
+ cVals[i] = kStrings[i % 4];
+ }
+ std::vector<VectorPtr> children = {
+ makeFlatVector<int32_t>(aVals),
+ makeFlatVector<int64_t>(bVals),
+ makeFlatVector<StringView>(cVals),
+ makeFlatVector<int64_t>(std::vector<int64_t>(kRows, 0)),
+ };
+ auto rowVector = makeRowVector({"a", "b", "c", "d"}, children);
+ auto batch = std::make_shared<VeloxColumnarBatch>(rowVector);
+
+ std::vector<uint8_t> actual = serializer->framedSerializeWithStats(batch);
+
+ // 3198-byte golden frame captured from apache/incubator-gluten main at
+ // ce6e16fe8f. Determinism verified by 3 reruns md5-identical
+ // (0f9c54179325b10f965b0dabe52f8749). Regenerate by capturing a fresh
+ // printf dump if an intentional wire bump occurs.
+ static const std::vector<uint8_t> kGoldenFrame = {
+ 0xFE, 0xCA, 0x53, 0x02, 0x99, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xCE, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x08, 0x00,
+ 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x61, 0x70, 0x70, 0x6C, 0x65, 0x04, 0x00,
+ 0x00, 0x00, 0x64, 0x61, 0x74, 0x65, 0x01, 0x00, 0x00, 0x00, 0x00, 0x64,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x0B, 0x00,
0x00, 0x64, 0x00, 0x00, 0x00, 0x04, 0xC4,
+ 0x0B, 0x00, 0x00, 0xC4, 0x0B, 0x00, 0x00, 0xF1, 0x94, 0x47, 0xAA, 0x00,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x5F, 0x41, 0x52, 0x52, 0x41,
0x59, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
+ 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00,
0x00, 0x0D, 0x00, 0x00, 0x00, 0x0E, 0x00,
+ 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x11, 0x00,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13,
+ 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16,
0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00,
0x1B, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
+ 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00,
0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 0x00,
+ 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x24, 0x00,
0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26,
+ 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x29,
0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00,
+ 0x2B, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00,
0x2E, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00,
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00,
0x00, 0x33, 0x00, 0x00, 0x00, 0x34, 0x00,
+ 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x37, 0x00,
0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x39,
+ 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x3C,
0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00,
+ 0x3E, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x41, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00,
+ 0x00, 0x43, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00,
0x00, 0x46, 0x00, 0x00, 0x00, 0x47, 0x00,
+ 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x4A, 0x00,
0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x4C,
+ 0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x4F,
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x51, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00,
0x54, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00,
+ 0x00, 0x56, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00,
0x00, 0x59, 0x00, 0x00, 0x00, 0x5A, 0x00,
+ 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x5D, 0x00,
0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x5F,
+ 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62,
0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00,
+ 0x0A, 0x00, 0x00, 0x00, 0x4C, 0x4F, 0x4E, 0x47, 0x5F, 0x41, 0x52, 0x52,
0x41, 0x59, 0x64, 0x00, 0x00, 0x00, 0x00,
+ 0xCE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xD2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xD3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xD7, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xD9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xDA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xED, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xF4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42,
0x4C, 0x45, 0x5F, 0x57, 0x49, 0x44, 0x54,
+ 0x48, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
0x00, 0x11, 0x00, 0x00, 0x00, 0x15, 0x00,
+ 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x26, 0x00,
0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2F,
+ 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x3F,
0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
+ 0x4A, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
0x59, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00,
+ 0x00, 0x65, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x6E, 0x00, 0x00,
0x00, 0x74, 0x00, 0x00, 0x00, 0x7A, 0x00,
+ 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x89, 0x00,
0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x93,
+ 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x9E, 0x00, 0x00, 0x00, 0xA4,
0x00, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00,
+ 0xAD, 0x00, 0x00, 0x00, 0xB3, 0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00,
0xBD, 0x00, 0x00, 0x00, 0xC2, 0x00, 0x00,
+ 0x00, 0xC8, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0xD2, 0x00, 0x00,
0x00, 0xD7, 0x00, 0x00, 0x00, 0xDD, 0x00,
+ 0x00, 0x00, 0xE3, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0xEC, 0x00,
0x00, 0x00, 0xF2, 0x00, 0x00, 0x00, 0xF8,
+ 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x07,
0x01, 0x00, 0x00, 0x0D, 0x01, 0x00, 0x00,
+ 0x11, 0x01, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x1C, 0x01, 0x00, 0x00,
0x22, 0x01, 0x00, 0x00, 0x26, 0x01, 0x00,
+ 0x00, 0x2B, 0x01, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, 0x37, 0x01, 0x00,
0x00, 0x3B, 0x01, 0x00, 0x00, 0x40, 0x01,
+ 0x00, 0x00, 0x46, 0x01, 0x00, 0x00, 0x4C, 0x01, 0x00, 0x00, 0x50, 0x01,
0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x5B,
+ 0x01, 0x00, 0x00, 0x61, 0x01, 0x00, 0x00, 0x65, 0x01, 0x00, 0x00, 0x6A,
0x01, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00,
+ 0x76, 0x01, 0x00, 0x00, 0x7A, 0x01, 0x00, 0x00, 0x7F, 0x01, 0x00, 0x00,
0x85, 0x01, 0x00, 0x00, 0x8B, 0x01, 0x00,
+ 0x00, 0x8F, 0x01, 0x00, 0x00, 0x94, 0x01, 0x00, 0x00, 0x9A, 0x01, 0x00,
0x00, 0xA0, 0x01, 0x00, 0x00, 0xA4, 0x01,
+ 0x00, 0x00, 0xA9, 0x01, 0x00, 0x00, 0xAF, 0x01, 0x00, 0x00, 0xB5, 0x01,
0x00, 0x00, 0xB9, 0x01, 0x00, 0x00, 0xBE,
+ 0x01, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0xCA, 0x01, 0x00, 0x00, 0xCE,
0x01, 0x00, 0x00, 0xD3, 0x01, 0x00, 0x00,
+ 0xD9, 0x01, 0x00, 0x00, 0xDF, 0x01, 0x00, 0x00, 0xE3, 0x01, 0x00, 0x00,
0xE8, 0x01, 0x00, 0x00, 0xEE, 0x01, 0x00,
+ 0x00, 0xF4, 0x01, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xFD, 0x01, 0x00,
0x00, 0x03, 0x02, 0x00, 0x00, 0x09, 0x02,
+ 0x00, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x61,
0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E,
+ 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74,
0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62,
+ 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64,
0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C,
+ 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72,
0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70,
+ 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65,
0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65,
+ 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63,
0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61,
+ 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E,
0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79,
+ 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E,
0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72,
+ 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62,
0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68,
+ 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C,
0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61,
+ 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70,
0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61,
+ 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65,
0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61,
+ 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61,
0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65,
+ 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79,
0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70,
+ 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72,
0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61,
+ 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68,
0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74,
+ 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61,
0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64,
+ 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61,
0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72,
+ 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61,
0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65,
+ 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65,
0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63,
+ 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70, 0x70,
0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E,
+ 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x61,
0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E,
+ 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61, 0x74,
0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62,
+ 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79, 0x64,
0x61, 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C,
+ 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65, 0x72, 0x72,
0x79, 0x64, 0x61, 0x74, 0x65, 0x61, 0x70,
+ 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63, 0x68, 0x65,
0x72, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65,
+ 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E, 0x61, 0x63,
0x68, 0x65, 0x72, 0x72, 0x79, 0x64, 0x61,
+ 0x74, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x62, 0x61, 0x6E, 0x61, 0x6E,
0x61, 0x63, 0x68, 0x65, 0x72, 0x72, 0x79,
+ 0x64, 0x61, 0x74, 0x65, 0x0A, 0x00, 0x00, 0x00, 0x4C, 0x4F, 0x4E, 0x47,
0x5F, 0x41, 0x52, 0x52, 0x41, 0x59, 0x64,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+ ASSERT_EQ(actual.size(), kGoldenFrame.size()) << "framedSerializeWithStats
output size diverged from golden frame. "
+ << "If this is an intentional
wire change, regenerate kGoldenFrame "
+ << "(see comment block above
the test).";
+ EXPECT_EQ(actual, kGoldenFrame) << "framedSerializeWithStats output bytes
diverged from golden frame.";
+}
+
+// Sibling no-bounds branch coverage (emitSupported=0 path).
+//
+// All-null BIGINT col MUST hit the no-bounds branch (computeStats ->
+// hasLowerBound=hasUpperBound=false -> marshalStatsInto emits supported=0, no
+// lower/upper bytes).
+//
+// This is intentionally a FIELD-LEVEL test, NOT a byte-equal golden: Velox
+// PrestoSerde dumps the FlatVector's raw `values` buffer regardless of null
+// bitmap, and an all-null FlatVector has UNINITIALIZED values buffer bytes.
+// Reader uses the null bitmap to skip them, but the wire output is
+// non-deterministic across reruns (3 runs -> 3 distinct md5 hashes; offset
+// ~166-170 + tail byte varied).
+//
+// So the emitSupported=0 coverage lives here as a field-level test, not in
+// the byte-equal golden above.
+TEST_F(VeloxColumnarBatchSerializerTest,
framedSerializeWithStatsAllNullColNoBounds) {
+ auto* arrowPool = getDefaultMemoryManager()->defaultArrowMemoryPool();
+ auto serializer = std::make_shared<VeloxColumnarBatchSerializer>(arrowPool,
pool_, nullptr);
+
+ constexpr int kRows = 5;
+ std::vector<VectorPtr> children = {
+
makeNullableFlatVector<int64_t>(std::vector<std::optional<int64_t>>(kRows,
std::nullopt)),
+ };
+ auto rowVector = makeRowVector({"d"}, children);
+ auto batch = std::make_shared<VeloxColumnarBatch>(rowVector);
+
+ std::vector<uint8_t> framed = serializer->framedSerializeWithStats(batch);
+
+ // Skip magic(4) + statsLen(4); statsBlob starts at offset 8.
+ ASSERT_GE(framed.size(), 8u);
+ const uint8_t* p = framed.data() + 8;
+ // numCols = 1 (u32 LE).
+ EXPECT_EQ(p[0], 1u);
+ EXPECT_EQ(p[1], 0u);
+ EXPECT_EQ(p[2], 0u);
+ EXPECT_EQ(p[3], 0u);
+ p += 4;
+ // Per-col header: supported(u8) + nullCount(u32) + count(u32) +
sizeInBytes(u64).
+ EXPECT_EQ(p[0], 0u) << "all-null col must emit supported=0 (no-bounds
branch)";
+ p += 1;
+ uint32_t nullCount = static_cast<uint32_t>(p[0]) |
(static_cast<uint32_t>(p[1]) << 8) |
+ (static_cast<uint32_t>(p[2]) << 16) | (static_cast<uint32_t>(p[3]) <<
24);
+ EXPECT_EQ(nullCount, static_cast<uint32_t>(kRows))
+ << "nullCount must equal row count for all-null col (JVM IsNull pruning
correctness)";
+ p += 4;
+ uint32_t count = static_cast<uint32_t>(p[0]) | (static_cast<uint32_t>(p[1])
<< 8) |
+ (static_cast<uint32_t>(p[2]) << 16) | (static_cast<uint32_t>(p[3]) <<
24);
+ EXPECT_EQ(count, static_cast<uint32_t>(kRows));
+ p += 4;
+ // sizeInBytes placeholder = 0 (8 bytes).
+ for (int k = 0; k < 8; ++k) {
+ EXPECT_EQ(p[k], 0u) << "sizeInBytes placeholder byte " << k << " must be
0";
+ }
+ // No lowerLen / upperLen / bounds bytes follow when supported=0.
+}
+
} // namespace gluten
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]