stoty commented on pull request #150:
URL: https://github.com/apache/calcite-avatica/pull/150#issuecomment-906240031


   This took way more than I thought.
   
   Simply mapping NUMERIC to BigDecimal instead of Number fixed the setObject 
issue. Number is abstract, and its other subclasses are already mapped, so this 
didn't cause issues.
   
   However,  pre-patch, AbstractCursor#BigDecimalAccessor is used to process 
BigDecimals, and AbstractCursor#NumberAccessor the other types.
   
   Changing the mapping has resulted in BigDecimals being handled by 
AbstractCursor#NumberAccessor which caused all kinds of rpoblems with the 
Calcite test suite.
   
   I fixed this by removing AbstractCursor#BigDecimalAccessor, which is no 
longer called, and changing AbstractCursor#NumberAccessor to behave like 
BigDecimalAccessor used to for BigDecimals.
   
   While exploring this, I found a lot of rather arbitrary behaviour, which I 
tried to summarize in the FIXME comment.
   
   However, I deemed that changing that is controversial, and would need to be 
coordianted with Calcite changes, so I did not touch the existing behaviour.


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


Reply via email to