vesense commented on a change in pull request #824: [IOTDB-503] Add
checkTimeseriesExists for session
URL: https://github.com/apache/incubator-iotdb/pull/824#discussion_r380739860
##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -558,6 +558,15 @@ public TSStatus createTimeseries(String path, TSDataType
dataType,
}
}
+ public boolean checkTimeseriesExists(String path) throws
IoTDBSessionException {
+ checkPathValidity(path);
+ try {
+ return executeQueryStatement(String.format("SHOW TIMESERIES %s",
path)).hasNext();
Review comment:
I think this is enough at present(as a tool method). If there are other
inputting scenes later, we can file another PR to do that.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services