cambyzju commented on a change in pull request #8765:
URL: https://github.com/apache/incubator-doris/pull/8765#discussion_r840996105
##########
File path: be/src/http/action/stream_load.cpp
##########
@@ -265,8 +266,14 @@ Status StreamLoadAction::_on_header(HttpRequest* http_req,
StreamLoadContext* ct
if (!http_req->header(HTTP_COMPRESS_TYPE).empty() &&
boost::iequals(http_req->header(HTTP_FORMAT_KEY), "JSON")) {
return Status::InternalError("compress data of JSON format is not
supported.");
}
- ctx->format =
- parse_format(http_req->header(HTTP_FORMAT_KEY),
http_req->header(HTTP_COMPRESS_TYPE));
+ std::string format_str = http_req->header(HTTP_FORMAT_KEY);
+ if (boost::iequals(format_str, BeConsts::CSV_WITH_NAMES) ||
+ boost::iequals(format_str, BeConsts::CSV_WITH_NAMES_AND_TYPES)) {
+ ctx->header_type = format_str;
+ //treat as CSV
+ format_str = "csv";
Review comment:
"csv" also use an const define like CSV_WITH_NAMES?
--
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]