You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/24 16:06:28 UTC

[GitHub] [arrow] toddfarmer opened a new pull request, #13433: ARROW-16600: [Java] Configurable RoundingMode to handle inconsistent scale in BigDecimals

toddfarmer opened a new pull request, #13433:
URL: https://github.com/apache/arrow/pull/13433

   Under certain conditions, JDBC vendors may return ResultSets where the scale of BigDecimal values differ by row. Existing logic required exact matching of every row to the established scale for the column (target vector), and throws UnsupportedOperationException when there is a mismatch, aborting ResultSet processing.  This change enables configuration of a java.math.RoundingMode to be applied in any required scale conversion, and should enable both full-fidelity truncation (trimming trailing zeros right of decimal) as well as lossy conversion (see [RoundingModes javadoc](https://docs.oracle.com/javase/8/docs/api/java/math/RoundingMode.html)).
   
   Note that this is implemented as a global configuration options - it will apply to all BigDecimal columns in a ResultSet being processed using the supplied config. It's possible to provide per-column control over this behavior, but I assessed that to complicate configuration for little benefit. Please indicate if this decision should be reevaluated.
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13433: ARROW-16600: [Java] Configurable RoundingMode to handle inconsistent scale in BigDecimals

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13433:
URL: https://github.com/apache/arrow/pull/13433#issuecomment-1165718808

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13433: ARROW-16600: [Java] Configurable RoundingMode to handle inconsistent scale in BigDecimals

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13433:
URL: https://github.com/apache/arrow/pull/13433#issuecomment-1165718776

   https://issues.apache.org/jira/browse/ARROW-16600


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm merged pull request #13433: ARROW-16600: [Java] Configurable RoundingMode to handle inconsistent scale in BigDecimals

Posted by GitBox <gi...@apache.org>.
lidavidm merged PR #13433:
URL: https://github.com/apache/arrow/pull/13433


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] toddfarmer commented on a diff in pull request #13433: ARROW-16600: [Java] Configurable RoundingMode to handle inconsistent scale in BigDecimals

Posted by GitBox <gi...@apache.org>.
toddfarmer commented on code in PR #13433:
URL: https://github.com/apache/arrow/pull/13433#discussion_r906208628


##########
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowConfig.java:
##########
@@ -101,6 +116,7 @@ public final class JdbcToArrowConfig {
    * @param reuseVectorSchemaRoot Whether to reuse the vector schema root for each data load.
    * @param arraySubTypesByColumnIndex The type of the JDBC array at the column index (1-based).
    * @param arraySubTypesByColumnName  The type of the JDBC array at the column name.
+   * @param targetBatchSize The target batch size to be used in preallcation of the resulting vectors.

Review Comment:
   Added this because it was missing, not related to other changes in this PR.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org