imay commented on a change in pull request #2305: Add a variable to specifically limit the memory usage of the load part in the insert operation URL: https://github.com/apache/incubator-doris/pull/2305#discussion_r351097762
########## File path: be/src/runtime/runtime_state.cpp ########## @@ -531,5 +531,14 @@ Status RuntimeState::get_codegen(LlvmCodeGen** codegen) { Status RuntimeState::StartSpilling(MemTracker* mem_tracker) { return Status::InternalError("Mem limit exceeded."); } + +int64_t RuntimeState::get_load_mem_limit() { + if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) { Review comment: Oh, I see. However I think it's not a good idea to get all queryOptions from session variables. For example, if we intent to support setting this value in load statement other than through setting variables, then it is not available to get right limit from session variables. And I think it's better to support this option in stream load. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org