vlsi commented on a change in pull request #1449:
URL: https://github.com/apache/calcite/pull/1449#discussion_r496993565



##########
File path: 
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -2925,6 +2933,83 @@ private Expression normalize(SqlTypeName typeName, 
Expression e) {
       }
     }
   }
+
+  /** Implements CLASSIFIER MR Function */
+  private static class ClassifierImplementor implements MatchImplementor {
+    @Override public Expression implement(RexToLixTranslator translator, 
RexCall call,
+        ParameterExpression row, ParameterExpression rows,
+        ParameterExpression symbols, ParameterExpression i) {
+      return Types.castIfNecessary(String.class,
+          Expressions.call(
+              symbols,
+              Types.lookupMethod(List.class, "get", int.class), i));
+    }
+  }
+
+  /** Implements LAST MR Function */
+  private static class LastImplementor implements MatchImplementor {
+    @Override public Expression implement(RexToLixTranslator translator, 
RexCall call,
+        ParameterExpression row, ParameterExpression rows,
+        ParameterExpression symbols, ParameterExpression i) {
+      final RexNode node = call.getOperands().get(0);
+
+      final String alpha = ((RexPatternFieldRef) 
call.getOperands().get(0)).getAlpha();
+
+      final BinaryExpression lastIndex = Expressions.subtract(

Review comment:
       @JulianFeinauer , this local variable is unused. Could you please check 
if it can be removed? On the other hand, it might mean there's a bug.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to