maobaolong commented on code in PR #2057:
URL:
https://github.com/apache/incubator-uniffle/pull/2057#discussion_r1721131462
##########
common/src/main/java/org/apache/uniffle/common/compression/Codec.java:
##########
@@ -29,6 +29,8 @@ public abstract class Codec {
public static Codec newInstance(RssConf rssConf) {
Type type = rssConf.get(COMPRESSION_TYPE);
switch (type) {
+ case NONE:
+ return null;
Review Comment:
It could encounter NPE if return null, maybe you can return a `NoneCodec`
which will do nothing but return `src` while call `compress(byte[] src)`.
The following test code will encounter NPE.
```java
compressData = Codec.newInstance(new RssConf()).compress(data);
```
--
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]