mihaibudiu commented on code in PR #5097:
URL: https://github.com/apache/calcite/pull/5097#discussion_r3574143043
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -1617,6 +1617,18 @@ private static String toSql(RelNode root, SqlDialect
dialect,
sql(query).ok(expected);
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7652">[CALCITE-7652]
+ * MssqlSqlDialect unparses CAST to TIMESTAMP as "TIMESTAMP", which is
invalid
+ * in SQL Server (should be DATETIME2)</a>. */
+ @Test void testCastToTimestampMssql() {
+ final String query = "select cast(\"hire_date\" as timestamp(3))\n"
Review Comment:
In general you cannot assume that the default type system is used; Calcite
is a library which can be configured in many ways.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]