public PreparedPlan getPlan(String key) {
if (this.globalState.planCache == null) {
return null;
}
CacheID id = new CacheID(new ParseInfo(), key, getVdbName(), getVdbVersion(), getConnectionID(), getUserName());
PreparedPlan pp = this.globalState.planCache.get(id);
if (pp != null) {
if (id.getSessionId() != null) {
setDeterminismLevel(Determinism.USER_DETERMINISTIC);
} else if (id.getUserName() != null) {