You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "MarcosZyk (via GitHub)" <gi...@apache.org> on 2023/05/17 10:12:08 UTC
[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #9871: Support schema cache when querying all measurement of devices using template
MarcosZyk commented on code in PR #9871:
URL: https://github.com/apache/iotdb/pull/9871#discussion_r1196263497
##########
node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java:
##########
@@ -107,13 +107,25 @@ public PartialPath(String path, boolean needSplit) {
public boolean hasWildcard() {
for (String node : nodes) {
- if (ONE_LEVEL_PATH_WILDCARD.equals(node) || MULTI_LEVEL_PATH_WILDCARD.equals(node)) {
+ // *, ** , d*, *d*
+ if (PathPatternUtil.hasWildcard(node)) {
return true;
}
}
return false;
}
+ // e.g. root.db.d.s, root.db.d.*, root.db.d.s*, not include patterns like root.db.d.**
+ public boolean hasExplicitDevice() {
+ for (int i = 0; i < nodes.length - 1; i++) {
+ // *, ** , d*, *d*
+ if (PathPatternUtil.hasWildcard(nodes[i])) {
+ return false;
+ }
+ }
+ return !nodes[nodes.length - 1].equals(MULTI_LEVEL_PATH_WILDCARD);
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org