You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2021/07/02 00:13:12 UTC

[incubator-pinot] 01/01: Validate the length of preprocessing operation from custom config

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch fix-preprocessing-operations
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit a4e804e37b23b569d30981f59902e4bf3c73dab7
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Thu Jul 1 17:12:39 2021 -0700

    Validate the length of preprocessing operation from custom config
---
 .../pinot/hadoop/utils/preprocess/DataPreprocessingUtils.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pinot-plugins/pinot-batch-ingestion/v0_deprecated/pinot-hadoop/src/main/java/org/apache/pinot/hadoop/utils/preprocess/DataPreprocessingUtils.java b/pinot-plugins/pinot-batch-ingestion/v0_deprecated/pinot-hadoop/src/main/java/org/apache/pinot/hadoop/utils/preprocess/DataPreprocessingUtils.java
index bf399af..4453440 100644
--- a/pinot-plugins/pinot-batch-ingestion/v0_deprecated/pinot-hadoop/src/main/java/org/apache/pinot/hadoop/utils/preprocess/DataPreprocessingUtils.java
+++ b/pinot-plugins/pinot-batch-ingestion/v0_deprecated/pinot-hadoop/src/main/java/org/apache/pinot/hadoop/utils/preprocess/DataPreprocessingUtils.java
@@ -75,12 +75,14 @@ public class DataPreprocessingUtils {
     }
   }
 
-  public static Set<Operation> getOperations(Set<Operation> operationSet, String preprocessingOperationsString) {
+  public static void getOperations(Set<Operation> operationSet, String preprocessingOperationsString) {
+    if (preprocessingOperationsString.trim().isEmpty()) {
+      return;
+    }
     String[] preprocessingOpsArray = preprocessingOperationsString.split(",");
     for (String preprocessingOps : preprocessingOpsArray) {
       operationSet.add(Operation.getOperation(preprocessingOps.trim().toUpperCase()));
     }
-    return operationSet;
   }
 
   public enum Operation {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org