/**
* @param config never null
*/
private ScanRequest createScanRequestFromExpression(Class<?> clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config) {
ScanRequest scanRequest = new ScanRequest();
scanRequest.setTableName(getTableName(clazz, config));
scanRequest.setScanFilter(scanExpression.getScanFilter());
scanRequest.setLimit(scanExpression.getLimit());
scanRequest.setExclusiveStartKey(scanExpression.getExclusiveStartKey());
scanRequest.setTotalSegments(scanExpression.getTotalSegments());
scanRequest.setSegment(scanExpression.getSegment());
scanRequest.setConditionalOperator(scanExpression.getConditionalOperator());
scanRequest.setRequestMetricCollector(config.getRequestMetricCollector());
return scanRequest;
}