jcamachor commented on a change in pull request #1828: [CALCITE-3734] MySQL 
JDBC rewrite is producing queries with CHAR with range beyond 255 (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1828#discussion_r384149928
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/dialect/MysqlSqlDialect.java
 ##########
 @@ -67,7 +84,7 @@
 
   /** Creates a MysqlSqlDialect. */
   public MysqlSqlDialect(Context context) {
-    super(context);
+    super(context.withDataTypeSystem(MYSQL_TYPE_SYSTEM));
 
 Review comment:
   The context seems to be set externally and dialects just use the given 
context which would come with the type system set; observe that the context is 
not being modified for other dialects, e.g., Postgres. I see that _ 
SqlDialectFactoryImpl.create_ sets a bunch of properties depending on the 
database product. It seems we should add the type system over there instead of 
overriding within each individual constructor?

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