myfjdthink opened a new issue, #12035:
URL: https://github.com/apache/doris/issues/12035

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   1.1.1
   
   ### What's Wrong?
   
   I have a json file that I'm trying to import into doris via stream load.
   
   test_data2.json
   ```json
   [
     {
       "block_hash": 
"0edaee38f6809844245bf73a6967c6180871bef0ca3531a350d6bf6eaf1af36d",
       "amount_raw": -999999999999.99,
       "token_price": 0.000999999999
     },
     {
       "block_hash": 
"0edaee38f6809844245bf73a6967c6180871bef0ca3531a350d6bf6eaf1af36d",
       "amount_raw": -999999999999.99,
       "token_price": 0.000999999999
     },
     {
       "block_hash": 
"0edaee3d3b8b051324f39d006f855916394eb7affa31a7162eb286283406af67",
       "amount_raw": -999999999999.99,
       "token_price": "0.000999999999"
     },
     {
       "block_hash": 
"0edaf377745fe7b1148698589c12fad55a53aa6100a9836cc09547b72e81d26a",
       "amount_raw": -999999999999.99,
       "token_price": "0.000999999999"
     }
   ]
   ```
   
   creat table sql:
   ```sql
   create table if not exists example_db.load_data_demo(
     `block_hash` varchar(200) NULL COMMENT "",
     `amount_raw` double NULL COMMENT "",
     `token_price` double NULL COMMENT ""
   ) ENGINE=OLAP
   UNIQUE KEY(`block_hash`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`block_hash`) BUCKETS 2;
   ```
   
   stream load to doris
   ```bash
   curl -v --location-trusted -u 'root:oW2aee@Vd7Ip8M1@0U*I7cu9ECi6' \
   -H "format: json" -H "jsonpaths: [\"$.block_hash\", \"$.amount_raw\", 
\"$.token_price\"]" \
   -H "strip_outer_array: true" \
   -T test_data2.json \
   http://localhost:8031/api/example_db/load_data_demo/_stream_load
   ```
   
   check data in doris 
   ```sql
   SELECT * from example_db.load_data_demo
   ```
   query result :
   
![image](https://user-images.githubusercontent.com/2044143/186345309-0df7e7cd-9f4a-4363-bd83-b69061e4cd71.png)
   
   If the type of token_price is a number, the import result will be wrong, the 
value will change from 0.000999999999 to 0.001, and if the type of token_price 
is a string, the result will be correct.
   
   
   
   ### What You Expected?
   
   Stream load values should remain as they are
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   Stream load csv file is working correctly
   
   test_data2.csv :
   ```csv
   
0edae5db9a555babfbdbc7876dc1c9f6b31c4946f28dad8832acd7f1b471b2a3,-999999999999.99,0.000999999999
   
0edae5f163809b65a89ebaba45714cfae0d8b8686d8e2fa467c8171792240c46,-999999999999.99,0.000999999999
   
0edae648204e8429f711b1993038144fcdff18c4def672ca2c0abd879cf0775c,-999999999999.99,0.000999999999
   
0edae64c08397d3d406cb5cd4d13cd6e95faf35aee0bfed8f9c5cba8720758ed,-999999999999.99,0.000999999999
   
0edae64f169d6dbfe11f766adc52fcf043a2cda4e180debde13fb6483ed9ec95,-999999999999.99,0.000999999999
   
0edaee38f6809844245bf73a6967c6180871bef0ca3531a350d6bf6eaf1af36d,-999999999999.99,0.000999999999
   
0edaee3d3b8b051324f39d006f855916394eb7affa31a7162eb286283406af67,-999999999999.99,0.000999999999
   
0edaf377745fe7b1148698589c12fad55a53aa6100a9836cc09547b72e81d26a,-999999999999.99,0.000999999999
   ```
   
   stream load 
   ```bash
   curl -v --location-trusted -u 'root:oW2aee@Vd7Ip8M1@0U*I7cu9ECi6' \
   -H "columns: block_hash, amount_raw, token_price" \
   -H "column_separator: ," \
   -T test_data2.csv \
   http://localhost:8031/api/gaia_data__origin_data/load_data_demo/_stream_load
   ```
   
   And Borker load has the same problem,Test results for different file formats
   - csv : correct
   - json : wrong
   - parquet : wrong
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to