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:
For JDBC, users can use sql `SHOW TIMESERIES`, for session native API, use
the new method `checkTimeseriesExists `. If no other scenes, I think this is
appropriate at present (as a tool method).
----------------------------------------------------------------
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