wenhuitang commented on a change in pull request #1861: [CALCITE-3468] JDBC 
adapter may generate casts on Oracle for varchar without the precision and for 
char with the precision exceeding max length of Oracle
URL: https://github.com/apache/calcite/pull/1861#discussion_r398299807
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/dialect/OracleSqlDialect.java
 ##########
 @@ -54,10 +54,20 @@
           case VARCHAR:
             // Maximum size of 4000 bytes for varchar2.
             return 4000;
+          case CHAR:
+            return 2000;
           default:
             return super.getMaxPrecision(typeName);
           }
         }
+        @Override public int getDefaultPrecision(SqlTypeName typeName) {
+          switch (typeName) {
+          case VARCHAR:
 
 Review comment:
   Thanks a lot, I add the comment for this kind of situation.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to