You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/09/13 07:41:49 UTC
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9376: Allow expression transformer cotinue on error
Jackie-Jiang commented on code in PR #9376:
URL: https://github.com/apache/pinot/pull/9376#discussion_r969260994
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ExpressionTransformer.java:
##########
@@ -125,8 +127,15 @@ public GenericRow transform(GenericRow record) {
// Skip transformation if column value already exist.
// NOTE: column value might already exist for OFFLINE data
if (record.getValue(column) == null) {
- Object result = transformFunctionEvaluator.evaluate(record);
- record.putValue(column, result);
+ if (_continueOnError) {
+ try {
+ record.putValue(column, transformFunctionEvaluator.evaluate(record));
+ } catch (Exception e) {
+ record.putValue(column, null);
Review Comment:
This `putValue()` is redundant. Also we should consider logging something (similar to `DataTypeTransformer`)
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org