mihaibudiu commented on code in PR #5118:
URL: https://github.com/apache/calcite/pull/5118#discussion_r3661666320
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -209,36 +208,28 @@ public class SqlFunctions {
private static final Function1<List<Object>, Enumerable<Object>>
LIST_AS_ENUMERABLE =
a0 -> a0 == null ? Linq4j.emptyEnumerable() : Linq4j.asEnumerable(a0);
+ /** Like {@link #LIST_AS_ENUMERABLE}, for a collection whose struct elements
+ * are kept whole: each element is converted from the collection's internal
+ * list representation to an Object[] struct value. */
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ private static final Function1<List<Object>, Enumerable<Object>>
STRUCT_LIST_AS_ENUMERABLE =
+ a0 -> a0 == null ? Linq4j.emptyEnumerable()
+ : Linq4j.asEnumerable(a0).select(e -> (Object) ((List) e).toArray());
Review Comment:
An attempt to fix this bug has revealed some independent problems in
RelToLixTranslator, which need to be fixed fix. I will file a separate issue
and mark this as draft until the other one is fixed.
--
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]