normanj-bitquill commented on code in PR #3826:
URL: https://github.com/apache/calcite/pull/3826#discussion_r1664545435
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java:
##########
@@ -189,6 +233,15 @@ static Expression joinSelector(JoinRelType joinType,
PhysType physType,
expressions.add(expression);
}
}
+
+ if (generateCompactCode) {
Review Comment:
@thomasrebele
Here is the code generated from a unit test.
```
{
return
org.apache.calcite.linq4j.EnumerableDefaults.nestedLoopJoin(org.apache.calcite.schema.Schemas.queryable(root,
root.getRootSchema().getSubSchema("ROOT"),
org.apache.calcite.interpreter.Row.class, "T1").asEnumerable(),
org.apache.calcite.schema.Schemas.queryable(root,
root.getRootSchema().getSubSchema("ROOT"),
org.apache.calcite.interpreter.Row.class, "T0").asEnumerable(), new
org.apache.calcite.linq4j.function.Predicate2() {
public boolean apply(org.apache.calcite.interpreter.Row left,
org.apache.calcite.interpreter.Row right) {
return true;
}
public boolean apply(Object left, Object right) {
return apply(
(org.apache.calcite.interpreter.Row) left,
(org.apache.calcite.interpreter.Row) right);
}
}
, new org.apache.calcite.linq4j.function.Function2() {
public String[] apply(org.apache.calcite.interpreter.Row left,
org.apache.calcite.interpreter.Row right) {
String[] outputArray = new String[201];
return outputArray;
}
public String[] apply(Object left, Object right) {
return apply(
(org.apache.calcite.interpreter.Row) left,
(org.apache.calcite.interpreter.Row) right);
}
}
, org.apache.calcite.linq4j.JoinType.INNER);
}
```
This is just returning an initialized String array of the correct size. The
data isn't copied.
The issue could be from here:
https://github.com/Bit-Quill/calcite/blob/calcite-3094-method-too-large/core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java#L347
What should `JavaRowFormat.copy()` return?
--
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]