docs: private void handleScalarSubQuery(
  		SqlSelect parentSelect,
  		SqlSelect selectItem,
  		List<SqlNode> expandedSelectItems,
  		Set<String> aliasList,
  		List<Map.Entry<String, RelDataType>> fieldList) {
  		// A scalar sub-query only has one output column.
  		if (1 != selectItem.getSelectList().size()) {
  			throw newValidationError(selectItem,
  				RESOURCE.onlyScalarSubQueryAllowed());
  		}
  
  		// No expansion in this routine just append to list.
  		expandedSelectItems.add(selectItem);
  
  		// Get or generate alias and add to list.
  		final String alias =
  			deriveAlias(
  				selectItem,
  				aliasList.size());
  		aliasList.add(alias);
  
  		final SelectScope scope = (SelectScope) getWhereScope(parentSelect);
  		final RelDataType type = deriveType(scope, selectItem);
  		setValidatedNodeType(selectItem, type);
  
  		// we do not want to pass on the RelRecordType returned
  		// by the sub query.  Just the type of the single expression
  		// in the sub-query select list.
  		assert type instanceof RelRecordType;
  		RelRecordType rec = (RelRecordType) type;
  
  		RelDataType nodeType = rec.getFieldList().get(0).getType();
  		nodeType = typeFactory.createTypeWithNullability(nodeType, true);
  		fieldList.add(Pair.of(alias, nodeType));
  	}