docs: public void declareCursor(SqlSelect select, SqlValidatorScope parentScope) {
  		cursorSet.add(select);
  
  		// add the cursor to a map that maps the cursor to its select based on
  		// the position of the cursor relative to other cursors in that call
  		FunctionParamInfo funcParamInfo = functionCallStack.peek();
  		Map<Integer, SqlSelect> cursorMap = funcParamInfo.cursorPosToSelectMap;
  		int numCursors = cursorMap.size();
  		cursorMap.put(numCursors, select);
  
  		// create a namespace associated with the result of the select
  		// that is the argument to the cursor constructor; register it
  		// with a scope corresponding to the cursor
  		SelectScope cursorScope = new SelectScope(parentScope, null, select);
  		cursorScopes.put(select, cursorScope);
  		final SelectNamespace selectNs = createSelectNamespace(select, select);
  		String alias = deriveAlias(select, nextGeneratedId++);
  		registerNamespace(cursorScope, alias, selectNs, false);
  	}