AMashenkov commented on a change in pull request #7813:
URL: https://github.com/apache/ignite/pull/7813#discussion_r426687629
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -342,10 +354,32 @@ public ClosableIteratorsHolder iteratorsHolder() {
}
/** {@inheritDoc} */
+ @SuppressWarnings("TypeMayBeWeakened")
@Override public List<FieldsQueryCursor<List<?>>> executeQuery(@Nullable
QueryContext ctx, String schema, String query, Object[] params) {
PlanningContext pctx = createContext(ctx, schema, query, params);
- return Commons.transform(prepare(pctx), p ->
executeSingle(UUID.randomUUID(), pctx, p));
+ List<QueryPlan> qryPlans = prepareQueryPlan(pctx);
+
+ return executePlans(qryPlans, pctx);
+ }
+
+ /**
+ * Executes prepared plans.
+ * @param qryPlans Query plans.
+ * @param pctx Query context.
+ * @return List of query result cursors.
+ */
+ @NotNull public List<FieldsQueryCursor<List<?>>>
executePlans(Collection<QueryPlan> qryPlans, PlanningContext pctx) {
+ List<FieldsQueryCursor<List<?>>> cursors = new
ArrayList<>(qryPlans.size());
+
+ for (QueryPlan plan : qryPlans) {
+ UUID qryId = UUID.randomUUID();
+
+ FieldsQueryCursor<List<?>> cur = executePlan(qryId, pctx, plan);
+
+ cursors.add(cur);
+ }
+ return cursors;
Review comment:
empty line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]