Bug 350763 User-defined Sort Hints in a data set got overwritten in a SQB design session
When editing a data set in the Data Set Editor, an user may add own user-defined Sort Hints. But each time an user activates the SQB designer page in DSE, those sort hints always got overwritten and replaced by the sort keys defined in the query's OrderBy clause. This is expected behavior if the OrderBy clause gets changed, as it is not clear how a revised OrderBy clause relates to those user-defined sort hints. However, if the OrderBy clause did not get changed, the previously defined sort hints should be preserved.
data/org.eclipse.birt.report.data.oda.jdbc.dbprofile.ui/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/ui/internal/sqb/SQLQueryUtility.java
updateParameterDesign( dataSetDesign, queryStmt );
    }
    /**
     * Returns the SQL query text ready for prepare by a JDBC driver.
     * @param queryStmt
     * @return
     */
    static String getPreparableSQL( final QueryStatement queryStmt )
    {
        if( queryStmt == null )
            return null;
        QueryStatement queryStmtCopy = copyQueryStatement( queryStmt );
        convertNamedVariablesToMarkers( queryStmtCopy );
        
        String queryText = StatementHelper.getSQLWithoutComments( queryStmtCopy );
        return queryText;
    }
    private static QueryStatement copyQueryStatement( final QueryStatement queryStmt )
    {
        QueryStatement queryStmtCopy = (QueryStatement) EcoreUtil.copy( queryStmt );
        
        
        queryStmtCopy.setSourceInfo( queryStmt.getSourceInfo());
        return queryStmtCopy;
    }
    /**
     * Convert any named parameter variables to a '?' parameter marker
     * @param queryStmt a query statement; its contents may get modified by this method