xtern commented on code in PR #4927: URL: https://github.com/apache/ignite-3/pull/4927#discussion_r1895855423
########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/KeyValueGetPlan.java: ########## @@ -142,60 +148,65 @@ public <RowT> AsyncCursor<InternalSqlRow> execute( List<RexNode> projectionExpr = lookupNode.projects(); List<RexNode> keyExpressions = lookupNode.keyExpressions(); - RelDataType rowType = sqlTable.getRowType(Commons.typeFactory(), requiredColumns); - - Supplier<RowT> keySupplier = ctx.expressionFactory() - .rowSource(keyExpressions); - Predicate<RowT> filter = filterExpr == null ? null : ctx.expressionFactory() - .predicate(filterExpr, rowType); - Function<RowT, RowT> projection = projectionExpr == null ? null : ctx.expressionFactory() - .project(projectionExpr, rowType); - - RowHandler<RowT> rowHandler = ctx.rowHandler(); - RowSchema rowSchema = TypeUtils.rowSchemaFromRelTypes(RelOptUtil.getFieldTypeList(rowType)); - RowFactory<RowT> rowFactory = rowHandler.factory(rowSchema); - - RelDataType resultType = lookupNode.getRowType(); - BiFunction<Integer, Object, Object> internalTypeConverter = TypeUtils.resultTypeConverter(ctx, resultType); - - ScannableTable scannableTable = execTable.scannableTable(); - Function<RowT, Iterator<InternalSqlRow>> postProcess = row -> { - if (row == null) { - return Collections.emptyIterator(); - } - - if (filter != null && !filter.test(row)) { - return Collections.emptyIterator(); - } + CompletableFuture<Iterator<InternalSqlRow>> result; - if (projection != null) { - row = projection.apply(row); + try { Review Comment: Thanks, try/catch moved to `ExecutionServiceImpl` -- 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. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org