rorueda commented on code in PR #3977:
URL: https://github.com/apache/calcite/pull/3977#discussion_r1774956997
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java:
##########
@@ -328,32 +376,9 @@ public abstract Expression record(
public abstract Expression field(Expression expression, int field,
@Nullable Type fromType, Type fieldType);
- /**
- * Similar to {@link #field(Expression, int, Type, Type)}, where the field
index is determined
- * dynamically at runtime.
- */
- public Expression fieldDynamic(Expression expression, Expression field) {
- throw new UnsupportedOperationException(this.toString());
- }
-
- public Expression setFieldDynamic(Expression expression, Expression field,
Expression value) {
- throw new UnsupportedOperationException(this.toString());
- }
-
/**
* Returns an expression that copies the fields of a row of this type to the
array.
*/
- public @Nullable Expression copy(ParameterExpression parameter,
- ParameterExpression outputArray, int outputStartIndex, int length) {
- // Note: parameter holds an expression representing a
org.apache.calcite.interpreter.Row.
-
- // Copy the Row as an Object[].
- final Expression rowParameterAsArrayExpression =
- Expressions.call(Object[].class, parameter, ROW_COPY_VALUES.method);
-
- // Use System.arraycopy() with the contents of the Row as the source.
- return Expressions.call(ARRAY_COPY.method, rowParameterAsArrayExpression,
- Expressions.constant(0), outputArray,
Expressions.constant(outputStartIndex),
- Expressions.constant(length));
- }
+ public abstract @Nullable List<Statement> copy(ParameterExpression parameter,
Review Comment:
It's not.
--
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]