Bug 200516 CachedQueryResults should also implement IQueryService.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryExecutor.java
for ( int i = 0; it.hasNext( ); i++ )
			{
				ISortDefinition src = (ISortDefinition) it.next( );
				int sortIndex = -1;
				String sortKey = src.getColumn( );
				if ( sortKey == null )
					sortKey = src.getExpression( ).getText( );
				else
				{
					sortKey = getColumnRefExpression( sortKey );
				}
				temporaryComputedColumns.add( new ComputedColumn( "_{$TEMP_SORT_"
						+ i + "$}_",
						sortKey,
						DataType.ANY_TYPE ) );
				sortIndex = -1;
				sortKey = String.valueOf( "_{$TEMP_SORT_" + i + "$}_" );
				IQuery.SortSpec dest = new IQuery.SortSpec( sortIndex,
						sortKey,
						src.getSortDirection( ) == ISortDefinition.SORT_ASC );
				sortSpecs[i] = dest;
			}
			odiQuery.setOrdering( Arrays.asList( sortSpecs ) );
		}
	}
	
	/**
	 * 
	 * @param cx
	 * @throws DataException