kgyrtkirk commented on a change in pull request #1048: [CALCITE-2722] Rewrite 
createLeftCall in iterative way instead of recursive way
URL: https://github.com/apache/calcite/pull/1048#discussion_r258364695
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
 ##########
 @@ -748,13 +747,14 @@ private SqlNode createSqlWindowBound(RexWindowBound 
rexWindowBound) {
     }
 
     private SqlNode createLeftCall(SqlOperator op, List<SqlNode> nodeList) {
-      if (nodeList.size() == 2) {
-        return op.createCall(new SqlNodeList(nodeList, POS));
+      assert nodeList != null && nodeList.size() >= 2;
 
 Review comment:
   just some minor notes; code is fine.
   
   * the summary of the commit headline should reflect more what the actual 
issue was and not describe the actual fix 
    - there are some guidelines here: https://calcite.apache.org/develop/ I 
would peek into `git log --grep Exception` to read a few examples
   * I feel that this comment should really be in the body of the commit message
   * this assert (if it fires) will just tell the user that something went 
wrong. You can either add a message or remove it as it seems like it works like 
this "by design"
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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