jackjlli commented on a change in pull request #7721:
URL: https://github.com/apache/pinot/pull/7721#discussion_r745105710



##########
File path: 
pinot-plugins/pinot-batch-ingestion/v0_deprecated/pinot-hadoop/src/main/java/org/apache/pinot/hadoop/job/preprocess/DataPreprocessingHelper.java
##########
@@ -198,7 +198,10 @@ private void setValidationConfigs(Job job, Path path)
           
job.getConfiguration().set(InternalConfigConstants.SEGMENT_TIME_TYPE, 
formatSpec.getColumnUnit().toString());
           job.getConfiguration()
               .set(InternalConfigConstants.SEGMENT_TIME_FORMAT, 
formatSpec.getTimeFormat().toString());
-          
job.getConfiguration().set(InternalConfigConstants.SEGMENT_TIME_SDF_PATTERN, 
formatSpec.getSDFPattern());
+          String sdfPattern = formatSpec.getSDFPattern();
+          if (sdfPattern != null) {
+            
job.getConfiguration().set(InternalConfigConstants.SEGMENT_TIME_SDF_PATTERN, 
formatSpec.getSDFPattern());
+          }

Review comment:
       Added two tests. One for testing null value of sdf pattern in 
`DateTimeFormatSpecTest` and the other for testing the caller of 
`getSDFPattern` in `DataPreprocessingHelperTest`.




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

Reply via email to