ggjh-159 opened a new pull request, #13680:
URL: https://github.com/apache/gluten/pull/13680

   ## What changes are proposed in this pull request?
   Relates to #13679.
   Adapts `GlutenStatefulRecordSerializer` — the GFV network-edge serializer 
that puts `RowVector.serialize()` bytes into the Flink stream — to velox4j's 
new `byte[]` vector serde contract. velox4j is switching 
`BaseVector.serialize()` / `baseVectorOps().deserializeOne()` from a base64 
String to the raw serialized frame (a presto columnar page; see the companion 
velox4j PR for the serde change and its measurements). The serializer now 
carries the payload as `byte[]` end to end:
   
   - `serialize`: the old code materialized a String from the JNI call and 
copied it again via `getBytes()` before writing to the `DataOutputView`; now 
the returned `byte[]` goes straight to `target.write`.
   - `deserialize`: the old code wrapped the read bytes in `new String(...)` 
before handing them to `deserializeOne`; now the `byte[]` is passed as-is.
   
   This removes the base64 wire expansion (4/3 of the payload) and two extra 
full-payload copies per record batch on the network edge. Depends on the 
companion velox4j change for both compilation and runtime (the velox4j jar in 
`$FLINK_HOME/lib` must be built from the new contract).
   
   ## How was this patch tested?
   
   `GlutenStatefulRecordSerializerTest` (gluten-flink `ut` module) against a 
velox4j jar built from the companion branch: 2/2 pass — 
`testDeserializeUsesTaskLocalSession` (serialize → deserialize round trip on a 
sampled RowVector through the task-local session) and 
`testTaskLocalSessionContextIsThreadIsolated`. 


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to