javeme commented on code in PR #326:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/pull/326#discussion_r958616288


##########
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/reader/file/OrcFileLineFetcher.java:
##########
@@ -123,11 +123,18 @@ public Line fetch() throws IOException {
         if (!this.recordReader.hasNext()) {
             return null;
         }
-
+        Object[] values = null;
         this.row = this.recordReader.next(this.row);
-        Object[] values = this.inspector.getStructFieldsDataAsList(this.row)
-                                        .stream().map(Object::toString)
-                                        .toArray();
+        try {
+            values = this.inspector.getStructFieldsDataAsList(this.row)
+                    .stream()
+                    .map(o -> o != null ? o.toString() : "")
+                    .toArray();
+        } catch (NullPointerException e) {

Review Comment:
   I think it won't throw NullPointerException if we translated null to "", 
right?



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

Reply via email to