aiguofer commented on code in PR #39485:
URL: https://github.com/apache/arrow/pull/39485#discussion_r1443544489
##########
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java:
##########
@@ -164,12 +167,21 @@ public static ArrowType getArrowTypeFromJdbcType(final
JdbcFieldInfo fieldInfo,
case Types.INTEGER:
return new ArrowType.Int(32, true);
case Types.BIGINT:
- return new ArrowType.Int(64, true);
+ precision = fieldInfo.getPrecision();
+ if (precision > 18) {
+ return new ArrowType.Decimal(precision, 0);
Review Comment:
We ran into an issue with this on Snowflake, which can have precision up to
38 (128 bit). Although technically some 19 precision numbers can be expressed
in 64 bit, the safest way to ensure the conversion always works seems to be
setting it to Decimal if the column precision > 18.
I can remove this, or add it in a separate PR if ya'll think think that's
better.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]