protected SqlSelect createSourceSelectForUpdate(SqlUpdate call) {
		final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO);
		selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
		int ordinal = 0;
		for (SqlNode exp : call.getSourceExpressionList()) {
			// Force unique aliases to avoid a duplicate for Y with
			// SET X=Y
			String alias = SqlUtil.deriveAliasFromOrdinal(ordinal);
			selectList.add(SqlValidatorUtil.addAlias(exp, alias));
			++ordinal;
		}
		SqlNode sourceTable = call.getTargetTable();
		if (call.getAlias() != null) {
			sourceTable =
				SqlValidatorUtil.addAlias(
					sourceTable,
					call.getAlias().getSimple());
		}
		return new SqlSelect(SqlParserPos.ZERO, null, selectList, sourceTable,
			call.getCondition(), null, null, null, null, null, null);
	}
protected SqlSelect createSourceSelectForUpdate ( SqlUpdate call ) { final SqlNodeList selectList = new SqlNodeList ( SqlParserPos . ZERO ) ; selectList . add ( SqlIdentifier . star ( SqlParserPos . ZERO ) ) ; int ordinal = 0 ; for ( SqlNode exp : call . getSourceExpressionList ( ) ) { String alias = SqlUtil . deriveAliasFromOrdinal ( ordinal ) ; selectList . add ( SqlValidatorUtil . addAlias ( exp , alias ) ) ; ++ ordinal ; } SqlNode sourceTable = call . getTargetTable ( ) ; if ( call . getAlias ( ) != null ) { sourceTable = SqlValidatorUtil . addAlias ( sourceTable , call . getAlias ( ) . getSimple ( ) ) ; } return new SqlSelect ( SqlParserPos . ZERO , null , selectList , sourceTable , call . getCondition ( ) , null , null , null , null , null , null ) ; }
Creates the SELECT statement that putatively feeds rows into an UPDATE
statement to be updated.

@param call Call to the UPDATE operator
@return select statement