SteveYurongSu commented on code in PR #11720:
URL: https://github.com/apache/iotdb/pull/11720#discussion_r1428747679


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/IoTDBDataRegionExtractor.java:
##########
@@ -84,6 +90,29 @@ public IoTDBDataRegionExtractor() {
 
   @Override
   public void validate(PipeParameterValidator validator) throws Exception {
+    // Check whether the pattern is legal
+    String pattern =
+        validator
+            .getParameters()
+            .getStringOrDefault(
+                Arrays.asList(EXTRACTOR_PATTERN_KEY, SOURCE_PATTERN_KEY),
+                EXTRACTOR_PATTERN_DEFAULT_VALUE);
+    try {
+      PathUtils.isLegalPath(pattern);
+    } catch (IllegalPathException e) {
+      try {
+        String[] pathNodes = StringUtils.split(pattern, "\\.");

Review Comment:
   What if pathNodes.length == 0 or == 1



-- 
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: reviews-unsubscr...@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to