wForget commented on code in PR #296:
URL: https://github.com/apache/incubator-uniffle/pull/296#discussion_r1012660534
##########
client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java:
##########
@@ -112,7 +112,11 @@ public List<ShuffleBlockInfo> addRecord(int partitionId,
Object key, Object valu
final long start = System.currentTimeMillis();
arrayOutputStream.reset();
serializeStream.writeKey(key, ClassTag$.MODULE$.apply(key.getClass()));
- serializeStream.writeValue(value,
ClassTag$.MODULE$.apply(value.getClass()));
+ if (value != null) {
+ serializeStream.writeValue(value,
ClassTag$.MODULE$.apply(value.getClass()));
+ } else {
+ serializeStream.writeValue(null, null);
Review Comment:
> Is it consistent with spark logic?
There is no special handling of null values in spark, but when the value is
null, scala infers that the ClassTag is `scala.reflect.ManifestFactory#Null`

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