This is not the point of the problem, the problem now is that the Chinese 
characters in the http header cannot be parsed because http uses ASCII. Even if 
I can use base64 encoding, doris doesn't know how to decode it, which is 
currently unsettable.

> 2022年2月8日 下午2:20,brain <brain.d...@analyticservice.net> 写道:
> 
> Is that a HttpPut method?
>>> curl -v --location-trusted -u root: -H "column_separator:," -H "merge_type: 
>>> MERGE" -H "columns: k1,k2" -H "delete: k1=2 and k2<=>'上海'" -T 1.txt 
>>> http://127.0.0.1:8042/api/db1/tbl2/_stream_load
> 
> Without -X PUT
> 
>> On Feb 7, 2022, at 8:40 PM, nan tu <liu192048...@gmail.com> wrote:
>> 
>> 感谢您的回复,中文引号是在写邮件时误加的,我试过curl命令也是可以的,但是使用Java代码,发送http请求却是不能正常删除,返回体没有报错。
>> 这是我的java代码:
>> try (CloseableHttpClient httpclient = HttpClientBuilder.create().build()) {
>>  HttpPut httpPut = new 
>> HttpPut("http://127.0.0.1:8040/api/db/table1/_stream_load? 
>> <http://127.0.0.1:8040/api/db/table1/_stream_load?>");
>>  httpPut.setHeader("Authorization", "Basic " + "cm9vdDo=");
>>  httpPut.setHeader("Expect", "100-continue");
>>  httpPut.setHeader("columns", "id,name");
>>  httpPut.setHeader("merge_type", "MERGE");
>>  httpPut.setHeader("delete", "id<=>'1' and name<=>'上海'");
>>  httpPut.setHeader("column_separator", ",");
>>  httpPut.setEntity(new ByteArrayEntity("1,上海".getBytes()));
>>  CloseableHttpResponse httpResponse = httpclient.execute(httpPut);
>>  int status = httpResponse.getStatusLine().getStatusCode();
>>  HttpEntity entity = httpResponse.getEntity();
>>  System.out.println("status: " + status);
>>  System.out.println("entity: " +  (entity != null ? 
>> EntityUtils.toString(entity) : ""));
>> }
>> 
>> <dependency>
>>   <groupId>org.apache.httpcomponents</groupId>
>>   <artifactId>httpclient</artifactId>
>>   <version>4.5.3</version>
>> </dependency>
>> 
>> 
>>> 2022年2月7日 下午7:03,陈明雨 <morning...@163.com> 写道:
>>> 
>>> I tested it with curl command and utf8 encoded data file.
>>> 
>>> 
>>> curl -v --location-trusted -u root: -H "column_separator:," -H "merge_type: 
>>> MERGE" -H "columns: k1,k2" -H "delete: k1=2 and k2<=>'上海'" -T 1.txt 
>>> http://127.0.0.1:8042/api/db1/tbl2/_stream_load
>>> 
>>> 
>>> It works fine.
>>> 
>>> 
>>> You problem may because you wrote a Chinese quota to wrap your data “中文”. 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> 
>>> 此致!Best Regards
>>> 陈明雨 Mingyu Chen
>>> 
>>> Email:
>>> chenmin...@apache.org
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 在 2022-02-07 15:32:01,"nan tu" <liu192048...@gmail.com> 写道:
>>>> Hi,如题所述:
>>>> 如下发送http请求批量导入数据,delete条件包含中文,已知http请求头不能识别中文,有什么方式可以处理这种情况吗?
>>>> ... columns: id, name" -H "merge_type: MERGE" -H "delete: id='1' AND 
>>>> name<=> ‘中文'
>>>> Thanks!
>> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
> For additional commands, e-mail: dev-h...@doris.apache.org
> 


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

Reply via email to