Github user patricker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1281#discussion_r90279351
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JdbcCommon.java
---
@@ -300,7 +307,7 @@ public static Schema createSchema(final ResultSet rs,
String recordName, boolean
// Check the precision of the BIGINT. Some databases
allow arbitrary precision (> 19), but Avro won't handle that.
// If the precision > 19 (or is negative), use a
string for the type, otherwise use a long. The object(s) will be converted
// to strings as necessary
- int precision = meta.getPrecision(i);
+ int precision =
dbAdapter.getSupportsMetaDataColumnGetPrecision()?meta.getPrecision(i):0;
--- End diff --
Probably `-1` would be a safer choice. If we can't retrieve precision, and
especially since HIVE supports up to Decimal 38... we don't want to
accidentally lose data or start throwing exceptions for overflows.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---