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

   ### 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
   
   3.0.8
   
   ### What's Wrong?
   
   I encountered an issue with escape characters while attempting to import 
data. I have already set `set global sql_mode=NO_BACKSLASH_ESCAPES`. However, 
whether I use `STREAM LOAD` or the `TVF S3` function to import JSON or Parquet 
data, escape characters are still being escaped. I actually don't need them to 
be escaped. I haven't found any relevant configuration options either.
   For example, the following data:
   ```json
   {"name":"kk\\ss"}
   ```
   Regardless of whether the data is in Parquet format or JSON format.The last 
data retrieved in Doris are as follows:
   ```text
   |name|
   -------
   |kk\ss|
   ```
   However, this data is considered an invalid string for backend languages 
like Java or Go. It will result in JSON parsing errors.
   Of course, this is just one example of unwanted escaping. I want the data to 
remain exactly as it is.
   Then I made the following attempts.
   ```sql
   drop table example_tbl_duplicate;
   
   CREATE TABLE IF NOT EXISTS example_tbl_duplicate
   (
       `name` VARCHAR(100)
   )
   DUPLICATE KEY(`name`)
   DISTRIBUTED BY HASH(`name`) BUCKETS 10;
   
   insert into example_tbl_duplicate (`name`)
   values ('kon\\sss'), ('sas\\ssas');
   
   select * from example_tbl_duplicate;
   ```
   
   <img width="1054" height="205" alt="Image" 
src="https://github.com/user-attachments/assets/dbc290c3-6489-48b3-9cfa-b344237c7b84";
 />
   
   In the above attempt, the data was entirely correct and no escaping was 
performed.
   
   
   Personally, I don't think Doris has extended NO_BACKSLASH_ESCAPES to data 
import operations like stream and tvf.
   I consider this extremely important. In fact, I believe escaping itself is a 
bug.
   
   ### What You Expected?
   
   no
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to