amrishlal commented on a change in pull request #8394:
URL: https://github.com/apache/pinot/pull/8394#discussion_r833796223



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ExpressionTransformer.java
##########
@@ -40,12 +41,18 @@
  */
 public class ExpressionTransformer implements RecordTransformer {
 
-  private final LinkedHashMap<String, FunctionEvaluator> _expressionEvaluators 
= new LinkedHashMap<>();
+  @VisibleForTesting
+  final LinkedHashMap<String, FunctionEvaluator> _expressionEvaluators = new 
LinkedHashMap<>();
 
   public ExpressionTransformer(TableConfig tableConfig, Schema schema) {
     Map<String, FunctionEvaluator> expressionEvaluators = new HashMap<>();
     if (tableConfig.getIngestionConfig() != null && 
tableConfig.getIngestionConfig().getTransformConfigs() != null) {
       for (TransformConfig transformConfig : 
tableConfig.getIngestionConfig().getTransformConfigs()) {
+        String columnName = transformConfig.getColumnName();
+        if (expressionEvaluators.containsKey(columnName)) {
+          throw new RuntimeException("Cannot set more than one ingestion 
transform function on a column (column name: "
+              + "'" + columnName + "').");
+        }

Review comment:
       Fixed.




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