@Override
  public void addQueryId(Long statementId, long queryId) {
    Set<Long> queryIds = statementIdToQueryId.get(statementId);
    if (queryIds == null) {
      throw new IllegalStateException(
          "StatementId: " + statementId + "doesn't exist in this session " + this);
    }
    queryIds.add(queryId);
  }
For Internal usage, like CQ and Select Into.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/InternalClientSession.java