danny0405 commented on a change in pull request #1474: [CALCITE-3370] Add NULL
direction emulation for MSSQL
URL: https://github.com/apache/calcite/pull/1474#discussion_r327903280
##########
File path:
core/src/main/java/org/apache/calcite/sql/dialect/MssqlSqlDialect.java
##########
@@ -61,6 +68,44 @@ public MssqlSqlDialect(Context context) {
top = context.databaseMajorVersion() < 11;
}
+ /**
+ * Emulate null FIRST/LAST with case statements.
+ */
+ @Override public SqlNode emulateNullDirection(SqlNode node, boolean
nullsFirst,
Review comment:
From the test case, it seems that not only MySQL has this feature to specify
the NULL Collation but also Hive, so this logic may be a common block for many
sql dialects, can we make more effort to move this method to `SqlDialect` and
reuse it for kind of sql dialects.
----------------------------------------------------------------
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