Vladsz83 commented on code in PR #11832:
URL: https://github.com/apache/ignite/pull/11832#discussion_r1933669908
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ArrayRowHandler.java:
##########
@@ -72,6 +73,34 @@ private ArrayRowHandler() {}
return fields;
}
+
+ /**
+ * Wraps a column collection to {@code Object[]} if requred using
the knowladge of expected column number.
+ *
+ * @param rowContainer Row values holder. Must be an {@code
Iteratable} or an {@code Object[]}.
+ */
+ @Override public Object[] createByRowContainer(Object
rowContainer) {
+ assert rowContainer instanceof Iterable ||
rowContainer.getClass() == Object[].class;
Review Comment:
Ok, let's use a collection. I don't think we should use a real code like
`if(...) throw ...` at each row being processed. Too costly. Yes, user might
make a mistake in his code or get and transfer an incorrect data. Well, an
exception will appear. IMHO, this is an admissible risk. WDYT?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]