luocooong commented on a change in pull request #2193:
URL: https://github.com/apache/drill/pull/2193#discussion_r602738548



##########
File path: 
contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcRecordReader.java
##########
@@ -210,8 +212,8 @@ public void setup(OperatorContext operatorContext, 
OutputMutator output) {
         String name = columns.get(i - 1).getRootSegmentPath();
         // column index in ResultSetMetaData starts from 1
         int jdbcType = meta.getColumnType(i);
-        int width = meta.getPrecision(i);
-        int scale = meta.getScale(i);
+        int width = Math.min(meta.getPrecision(i), 
DRILL_REL_DATATYPE_SYSTEM.getMaxNumericPrecision());

Review comment:
       Nice idea. Is it possible to add the description of UDF (with the 
limitation of precision) in the 
[JDBC](https://github.com/apache/drill/blob/gh-pages/_docs/connect-a-data-source/plugins/080-rdbms-storage-plugin.md)
 docs?




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


Reply via email to