zabetak commented on code in PR #3155:
URL: https://github.com/apache/calcite/pull/3155#discussion_r1170582001


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -6840,6 +6828,20 @@ Sql withSpark() {
       return dialect(DatabaseProduct.SPARK.getDialect());
     }
 
+    Sql withRedshiftHighPrecision() {
+      SqlDialect.Context context =
+          RedshiftSqlDialect.DEFAULT_CONTEXT.withDataTypeSystem(new 
RelDataTypeSystemImpl() {
+            @Override
+            public int getMaxNumericPrecision() {
+              // Ensures that parsed decimal will not be truncated during SQL 
to Rel transformation
+              // The default type system sets precision to 19 so it is not 
sufficient to test
+              // this change.
+              return 100;
+            }
+          });
+      return dialect(new RedshiftSqlDialect(context));
+    }
+

Review Comment:
   Probably we don't need this at all. If we get the `typesystem` from the 
dialect as you did in L6947 we could just use the normal Redshift dialect 
without changing its default `typesystem`. The test results will not change.



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