zabetak commented on a change in pull request #2459:
URL: https://github.com/apache/calcite/pull/2459#discussion_r669563116



##########
File path: 
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
##########
@@ -5430,6 +5430,43 @@ private void checkLiteral2(String expression, String 
expected) {
         .ok(expected);
   }
 
+
+  @Test void testTINYINTRedshift() {

Review comment:
       Reserved words are case insensitive so TINYINT vs. tinyint does not make 
a different for Calcite. Please remove this variant.

##########
File path: 
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
##########
@@ -5430,6 +5430,43 @@ private void checkLiteral2(String expression, String 
expected) {
         .ok(expected);
   }
 
+
+  @Test void testTINYINTRedshift() {
+    String query = "SELECT CAST(\"department_id\" AS TINYINT) FROM 
\"employee\"";
+    String expected = "SELECT CAST(\"department_id\" AS \"int2\")\n"
+        + "FROM \"foodmart\".\"employee\"";
+    sql(query)
+        .withRedshift()
+        .ok(expected);
+  }
+
+  @Test void testtinyintRedshift() {

Review comment:
       To keep things uniform with existing tests in the class rename to:
   `testRedshiftCastToTinyint` (see `testMysqlCastToBigint` for instance). You 
could also name it `testCastToTinyint`, leaving it a bit more general (similar 
to `testCastToVarchar`), which could be extended later for different 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to