jinxing64 commented on a change in pull request #1285: [CALCITE-3154] 
RelToSqlConverter generated Nulls Last and Nulls First when convert RexOver to 
sql using MysqlSqlDialect.
URL: https://github.com/apache/calcite/pull/1285#discussion_r300592651
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
 ##########
 @@ -795,6 +795,29 @@ void addOrderItem(List<SqlNode> orderByList, 
RelFieldCollation field) {
       orderByList.add(toSql(field));
     }
 
+
+    void addOrderItem(List<SqlNode> orderByList, RexProgram program, 
RexFieldCollation field) {
+      SqlNode node = toSql(program, field.left);
+      SqlNode nullDirectionNode = null;
+      if (field.getNullDirection() != 
RelFieldCollation.NullDirection.UNSPECIFIED) {
+        final boolean first =
+                  field.getNullDirection() == 
RelFieldCollation.NullDirection.FIRST;
 
 Review comment:
   How about refine the indentation ?

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