Indhumathi27 commented on a change in pull request #4228:
URL: https://github.com/apache/carbondata/pull/4228#discussion_r730834284



##########
File path: 
processing/src/main/java/org/apache/carbondata/processing/datatypes/PrimitiveDataType.java
##########
@@ -237,21 +237,31 @@ public boolean getIsColumnDictionary() {
 
   @Override
   public void writeByteArray(Object input, DataOutputStream dataOutputStream,
-      BadRecordLogHolder logHolder, Boolean isWithoutConverter) throws 
IOException {
+      BadRecordLogHolder logHolder, Boolean isWithoutConverter, boolean 
isEmptyBadRecord)
+      throws IOException {
     String parsedValue = null;
     // write null value
     if (null == input || ((this.carbonDimension.getDataType() == 
DataTypes.STRING
         || this.carbonDimension.getDataType() == DataTypes.VARCHAR) && 
input.equals(nullFormat))) {
       updateNullValue(dataOutputStream, logHolder);
       return;
     }
+    if (input.equals("") && isEmptyBadRecord) {
+      CarbonBadRecordUtil.setErrorMessage(logHolder, 
carbonDimension.getColName(),

Review comment:
       this can be moved inside updateNullValue method and can be reused




-- 
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: dev-unsubscr...@carbondata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to