// 1. Sorting can be performed in the data source query.
// 2. Pagination should be performed in the data source query IFF skipping
// isn't stated in the original query.
dataSourceQuery.setSort(query.getSort());
if (query.hasRowSkipping()) {
completionQuery.copyRowSkipping(query);
completionQuery.copyRowLimit(query);
completionQuery.copyRowOffset(query);
} else {
dataSourceQuery.copyRowLimit(query);
dataSourceQuery.copyRowOffset(query);