[ 
https://issues.apache.org/jira/browse/ARROW-16600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558578#comment-17558578
 ] 

Jonathan Swenson commented on ARROW-16600:
------------------------------------------

[~toddfarmer] Thank you for your work here! With this and the other 
configuration options you've added, I believe this allows for a reasonable 
remedy of the Postgres unbounded decimal issue (with variable scale). 

I think my best course of action will be to detect these columns (by inspecting 
the result set ahead of time) and using the tooling you've provided to map 
unbounded decimal values to a reasonable precision / scale. 

> [Java] Enable configurable scale coercion of BigDecimal
> -------------------------------------------------------
>
>                 Key: ARROW-16600
>                 URL: https://issues.apache.org/jira/browse/ARROW-16600
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>    Affects Versions: 8.0.0
>            Reporter: Todd Farmer
>            Assignee: Todd Farmer
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Per ARROW-16427, JDBC drivers sometimes return ResultSets where the scale of 
> BigDecimals in a single column differs by row.  The existing mapping requires 
> exact match of scale to the target Arrow vector that was created based on 
> ResultSetMetaData (or configuration), and when any row does not match 
> exactly, an Exception is thrown.
> To support JDBC drivers where scale may be inconsistent by row, Arrow should 
> allow a less-strict mode that coerces BigDecimals to target vectors with 
> greater scale.  The default strict behavior should be retained, but it may be 
> useful to allow coercion to proper target scale. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to