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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/DataTypeTransformer.java:
##########
@@ -95,7 +103,12 @@ public GenericRow transform(GenericRow record) {
 
         record.putValue(column, value);
       } catch (Exception e) {
-        throw new RuntimeException("Caught exception while transforming data 
type for column: " + column, e);
+        if (!_useDefaultValueOnError) {
+          throw new RuntimeException("Caught exception while transforming data 
type for column: " + column, e);
+        } else {
+          LOGGER.debug("Caught exception while transforming data type for 
column: {}", column, e);
+          record.putValue(column, null);

Review Comment:
   is it intended to always set null here and let NullValueTransformer (which 
happens after DataTypeTransformer) to change null to the default value set for 
nullValueHandling?It's pretty neat to me. 



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