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

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
 ##########
 @@ -1015,17 +1015,23 @@ private static boolean flattenFields(
    * @param type         type descriptor
    * @param charSetName  charSet name
    * @param maxPrecision The max allowed precision.
+   * @param allowsPrecisionUnspecified whether allows precision not specified
+   * @param defaultPrecision The default precision.
    * @return corresponding parse representation
    */
   public static SqlDataTypeSpec convertTypeToSpec(RelDataType type,
-      String charSetName, int maxPrecision) {
+      String charSetName, int maxPrecision,
+      boolean allowsPrecisionUnspecified, int defaultPrecision) {
     SqlTypeName typeName = type.getSqlTypeName();
 
 Review comment:
   I would suggest to replace `allowsPrecisionUnspecified` and 
`defaultPrecision` with a single `explicitPrecision`, and if a 
`explicitPrecision` is specified, use it directly.

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