zabetak commented on a change in pull request #1164: [CALCITE-2998] RexCopier 
should support all rex types (Chunwei Lei)
URL: https://github.com/apache/calcite/pull/1164#discussion_r277595197
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexCopier.java
 ##########
 @@ -52,11 +53,30 @@ private RelDataType copy(RelDataType type) {
   }
 
   public RexNode visitOver(RexOver over) {
-    throw new UnsupportedOperationException();
+    final boolean[] update = null;
+    return new RexOver(copy(over.getType()), over.getAggOperator(),
+        visitList(over.getOperands(), update), visitWindow(over.getWindow()),
+        over.isDistinct(), over.ignoreNulls());
   }
 
   public RexWindow visitWindow(RexWindow window) {
 
 Review comment:
   I would assume that if every other visit method creates a new instance of a 
RexNode then RexShuttle would take care of it. Sorry for insisting on this but 
I would prefer if don't we duplicate pieces of code (especially between 
parent-child classes). I will give it some thought ;)

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


With regards,
Apache Git Services

Reply via email to