ShreelekhyaG commented on a change in pull request #4218:
URL: https://github.com/apache/carbondata/pull/4218#discussion_r709785985



##########
File path: 
processing/src/main/java/org/apache/carbondata/processing/datatypes/PrimitiveDataType.java
##########
@@ -412,16 +412,18 @@ private void updateValueToByteStream(DataOutputStream 
dataOutputStream, byte[] v
     dataOutputStream.write(value);
   }
 
-  private void updateNullValue(DataOutputStream dataOutputStream, 
BadRecordLogHolder logHolder)
-      throws IOException {
+  private void updateNullValue(Object input, DataOutputStream dataOutputStream,
+      BadRecordLogHolder logHolder) throws IOException {
     CarbonUtil.updateNullValueBasedOnDatatype(dataOutputStream, 
this.carbonDimension.getDataType());
-    String message = 
logHolder.getColumnMessageMap().get(carbonDimension.getColName());
-    if (null == message) {
-      message = CarbonDataProcessorUtil
-          .prepareFailureReason(carbonDimension.getColName(), 
carbonDimension.getDataType());
-      logHolder.getColumnMessageMap().put(carbonDimension.getColName(), 
message);
+    if (null == input) {
+      String message = 
logHolder.getColumnMessageMap().get(carbonDimension.getColName());
+      if (null == message) {
+        message = CarbonDataProcessorUtil
+            .prepareFailureReason(carbonDimension.getColName(), 
carbonDimension.getDataType());
+        logHolder.getColumnMessageMap().put(carbonDimension.getColName(), 
message);
+        logHolder.setReason(message);

Review comment:
       can move setReason to line 426 after closing one if case of (null == 
message)

##########
File path: 
processing/src/main/java/org/apache/carbondata/processing/datatypes/ArrayDataType.java
##########
@@ -171,13 +171,13 @@ public boolean getIsColumnDictionary() {
   }
 
   @Override
-  public void writeByteArray(ArrayObject input, DataOutputStream 
dataOutputStream,
+  public void writeByteArray(Object input, DataOutputStream dataOutputStream,
       BadRecordLogHolder logHolder, Boolean isWithoutConverter) throws 
IOException {
-    if (input == null) {
+    if (input == null || input.equals("\\N")) {

Review comment:
       check if we could get `SERIALIZATION_NULL_FORMAT ` while creating 
complex type from FieldEncoderFactory




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