You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "GoGoWen (via GitHub)" <gi...@apache.org> on 2023/06/30 09:49:37 UTC

[GitHub] [doris] GoGoWen opened a new issue, #21389: [Bug] (JSON load) fix json load get string value wrong when the string contain "\u0000"

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

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   1.2 and master
   
   ### What's Wrong?
   
   1,  create table like:
   CREATE TABLE `test` (
     `pin_id` bigint(20) NOT NULL,
     `pin` varchar(10) NOT NULL,
     `date` date NOT NULL COMMENT '天级别',
     `ecpc_exp_2_cost` bigint(20) SUM NULL DEFAULT "0" COMMENT 'ecpc'
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `pin`, `date`)
   
   2, load below json with stream load
   {"pin_id":1233,"pin":"aaaaaaaa\u0000aaaa","date":"2023-05-30","ecpc_exp_2_cost":10}
   
   3, this load will succeed with pin:"aaaaaaaa",  this should be wrong as "aaaaaaaa\u0000aaaa" is a valid string and length exceed 10. the load should failed as "the length of data exceed that defined in schema". 
   
   ### What You Expected?
   
   load failed
   as the data convert from parquet format, and loading with parquet format will fail. 
   
   ### How to Reproduce?
   
   1,  create table like:
   CREATE TABLE `test` (
     `pin_id` bigint(20) NOT NULL,
     `pin` varchar(10) NOT NULL,
     `date` date NOT NULL COMMENT '天级别',
     `ecpc_exp_2_cost` bigint(20) SUM NULL DEFAULT "0" COMMENT 'ecpc'
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `pin`, `date`)
   
   2, load below json with stream load
   {"pin_id":1233,"pin":"aaaaaaaa\u0000aaaa","date":"2023-05-30","ecpc_exp_2_cost":10}
   
   3, this load will succeed with pin:"aaaaaaaa",  this should be wrong as "aaaaaaaa\u0000aaaa" is a valid string and length exceed 10. the load should failed as "the length of data exceed that defined in schema". 
   
   ### Anything Else?
   
   None
   
   ### Are you willing to submit PR?
   
   - [X] 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-unsubscribe@doris.apache.org.apache.org

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


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


[GitHub] [doris] yiguolei closed issue #21389: [Bug] (JSON load) fix json load get string value wrong when the string contain "\u0000"

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei closed issue #21389: [Bug] (JSON load) fix json load get string value wrong when the string contain "\u0000"
URL: https://github.com/apache/doris/issues/21389


-- 
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-unsubscribe@doris.apache.org

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


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