shibd opened a new pull request, #15687:
URL: https://github.com/apache/pulsar/pull/15687

   ### Motivation
   
   In the current sql implementation, If using `JSON` schema and querying for 
decimal type, there will be the following two errors:
   
   1. The data type is displayed as varchar.
   2. Loss of precision because scientific notation is used to display.
   
   ```
   presto> select bigdecimal, typeof(bigdecimal) as devimal_type from 
pulsar."public/default".test_avro2;
         bigdecimal       | devimal_type
   -----------------------+--------------
    1.2345678912345678E36 | varchar
    1.2345678912345678E36 | varchar
   (2 rows)
   ```
   The original data is: `1234567891234567891234567891234567.89`
   
   ### Modifications
   -  When getting jsonNode,  use `BIG_DECIMAL` instead of float and double.
   - `PulsarJsonFieldDecoder` increases the processing of Decimal types
   - 
   ### Documentation
   - [x] `no-need-doc` 
   (Please explain why)
   


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