klsince commented on code in PR #9320:
URL: https://github.com/apache/pinot/pull/9320#discussion_r961196323


##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/IndexingConfig.java:
##########
@@ -283,6 +284,14 @@ public void setNullHandlingEnabled(boolean 
nullHandlingEnabled) {
     _nullHandlingEnabled = nullHandlingEnabled;
   }
 
+  public boolean useDefaultValueOnError() {

Review Comment:
   from my tests, this has to start with `is`, like `isUseDefaultValueOnError`, 
in order to add it to TableConfig, otherwise it's discarded and marked as 
unrecognized unrecognizedProperties.



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/DataTypeTransformer.java:
##########
@@ -59,6 +76,16 @@ public GenericRow transform(GenericRow record) {
         if (value == null) {
           continue;
         }
+
+        if (_useDefaultValueOnError && _timeColumnSpec != null && 
column.equals(_timeColumnSpec.getName())) {
+          DateTimeFormatSpec dateTimeFormatSpec = 
_timeColumnSpec.getFormatSpec();
+          long timeInMs = 
dateTimeFormatSpec.fromFormatToMillis(value.toString());
+          if (!TimeUtils.timeValueInValidRange(timeInMs)) {

Review Comment:
   nit: add a DEBUG level for this? 



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java:
##########
@@ -784,6 +786,14 @@ public void setNullHandlingEnabled(boolean 
nullHandlingEnabled) {
     _nullHandlingEnabled = nullHandlingEnabled;
   }
 
+  public boolean useDefaultValueOnError() {

Review Comment:
   this looks like not used. but anyway, might want to change its name to 
isUseDefaultValueOnError()



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