Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 6f25e2d

Browse files
author
Corneil du Plessis
committed
Provide for explicit thin results in queryForPageableResults
1 parent 0619bac commit 6f25e2d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spring-cloud-dataflow-aggregate-task/src/main/java/org/springframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,14 @@ public Page<AggregateTaskExecution> findRunningTaskExecutions(String taskName, P
471471
return queryForPageableResults(pageable, SELECT_CLAUSE, FROM_CLAUSE,
472472
RUNNING_TASK_WHERE_CLAUSE,
473473
new MapSqlParameterSource("taskName", taskName),
474-
getRunningTaskExecutionCountByTaskName(taskName));
474+
getRunningTaskExecutionCountByTaskName(taskName), false);
475475
}
476476

477477
@Override
478478
public Page<AggregateTaskExecution> findTaskExecutionsByName(String taskName, Pageable pageable) {
479479
return queryForPageableResults(pageable, SELECT_CLAUSE, FROM_CLAUSE,
480480
TASK_NAME_WHERE_CLAUSE, new MapSqlParameterSource("taskName", taskName),
481-
getTaskExecutionCountByTaskName(taskName));
481+
getTaskExecutionCountByTaskName(taskName), false);
482482
}
483483

484484
@Override
@@ -490,7 +490,7 @@ public List<String> getTaskNames() {
490490
@Override
491491
public Page<AggregateTaskExecution> findAll(Pageable pageable) {
492492
return queryForPageableResults(pageable, SELECT_CLAUSE, FROM_CLAUSE, null,
493-
new MapSqlParameterSource(), getTaskExecutionCount());
493+
new MapSqlParameterSource(), getTaskExecutionCount(), true);
494494
}
495495

496496

@@ -500,7 +500,8 @@ private Page<AggregateTaskExecution> queryForPageableResults(
500500
String fromClause,
501501
String whereClause,
502502
MapSqlParameterSource queryParameters,
503-
long totalCount
503+
long totalCount,
504+
boolean thinResults
504505
) {
505506
SqlPagingQueryProviderFactoryBean factoryBean = new SqlPagingQueryProviderFactoryBean();
506507
factoryBean.setSelectClause(selectClause);
@@ -539,7 +540,7 @@ private Page<AggregateTaskExecution> queryForPageableResults(
539540
}
540541
String query = pagingQueryProvider.getPageQuery(pageable);
541542
List<AggregateTaskExecution> resultList = this.jdbcTemplate.query(query,
542-
queryParameters, new CompositeTaskExecutionRowMapper(false));
543+
queryParameters, new CompositeTaskExecutionRowMapper(!thinResults));
543544
resultList.stream()
544545
.collect(Collectors.groupingBy(AggregateTaskExecution::getSchemaTarget))
545546
.forEach(this::populateArguments);

0 commit comments

Comments
 (0)