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

hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a3b42cce6 [VL] Gluten-it: Allow empty configurations in dimension 
pattern (#11042)
3a3b42cce6 is described below

commit 3a3b42cce6ad2490acf3cb680aab78d425ca02b4
Author: Hongze Zhang <[email protected]>
AuthorDate: Tue Nov 11 17:51:27 2025 +0000

    [VL] Gluten-it: Allow empty configurations in dimension pattern (#11042)
---
 .../apache/gluten/integration/command/Parameterized.java   | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/tools/gluten-it/common/src/main/java/org/apache/gluten/integration/command/Parameterized.java
 
b/tools/gluten-it/common/src/main/java/org/apache/gluten/integration/command/Parameterized.java
index 597f6e8fee..e6bb2237e1 100644
--- 
a/tools/gluten-it/common/src/main/java/org/apache/gluten/integration/command/Parameterized.java
+++ 
b/tools/gluten-it/common/src/main/java/org/apache/gluten/integration/command/Parameterized.java
@@ -68,8 +68,8 @@ public class Parameterized implements Callable<Integer> {
   private String[] excludedDims = new String[0];
 
   private static final Pattern dimPattern1 =
-      Pattern.compile("([\\w-]+):([^,:]+)((?:,[^=,]+=[^=,]+)+)");
-  private static final Pattern dimPattern2 = 
Pattern.compile("([^,:]+)((?:,[^=,]+=[^=,]+)+)");
+      Pattern.compile("([\\w-]+):([^,:]+)((?:,[^=,]+=[^=,]+)*)");
+  private static final Pattern dimPattern2 = 
Pattern.compile("([^,:]+)((?:,[^=,]+=[^=,]+)*)");
 
   private static final Pattern excludedDimsPattern =
       Pattern.compile("[\\w-]+:[^,:]+(?:,[\\w-]+:[^,:]+)*");
@@ -120,19 +120,17 @@ public class Parameterized implements Callable<Integer> {
       if (matcher1.matches()) {
         dimName = matcher1.group(1);
         dimValueName = matcher1.group(2);
-        confText = matcher1.group(3).substring(1); // trim leading ","
+        confText = matcher1.group(3);
       } else {
         // matcher2.matches
         dimName = matcher2.group(1);
         dimValueName = matcher2.group(0);
-        confText = matcher2.group(2).substring(1); // trim leading ","
+        confText = matcher2.group(2);
       }
 
       final List<Map.Entry<String, String>> options = new ArrayList<>();
-      String[] splits = confText.split(",");
-      if (splits.length == 0) {
-        throw new IllegalArgumentException("Unexpected dim: " + dim);
-      }
+      final List<String> splits =
+          Arrays.stream(confText.split(",")).filter(s -> 
!s.isEmpty()).collect(Collectors.toList());
       for (String split : splits) {
         String[] kv = split.split("=");
         if (kv.length != 2) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to