xtern commented on code in PR #4807: URL: https://github.com/apache/ignite-3/pull/4807#discussion_r1863059425
########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/SqlRowHandler.java: ########## @@ -107,12 +107,16 @@ public RowWrapper concat(RowWrapper left, RowWrapper right) { @Override public RowWrapper map(RowWrapper row, int[] mapping) { Object[] fields = new Object[mapping.length]; + Builder schemaBuilder = RowSchema.builder(); + List<TypeSpec> originalFields = row.rowSchema().fields(); for (int i = 0; i < mapping.length; i++) { - fields[i] = row.get(mapping[i]); + int mappedIdx = mapping[i]; + fields[i] = row.get(mappedIdx); + schemaBuilder.addField(originalFields.get(mappedIdx)); } - return new ObjectsArrayRowWrapper(row.rowSchema(), fields); + return new ObjectsArrayRowWrapper(schemaBuilder.build(), fields); Review Comment: Update. There is no need for SqlRowHandler.schema(row) method, just pass source schema in constructor ``` RelDataType rowType = rel.getInput().getRowType(); RowSchema rowSchema = rowSchemaFromRelTypes(RelOptUtil.getFieldTypeList(rowType)); ``` -- 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