I have set my impala.admission-control.min-query-mem-limit.root.default to 2GiB and my impala.admission-control.max-query-mem-limit.root.default to 57GiB, which aligned with the memory allocation for each Impala Executor node that I've set on the resource templates.
My problem is, when I'm running a heavy query (I tried to set it so the limit is 10000000), the limit memory is set to 2GiB and makes the query OOM, which is strange because the max-query-mem-limit is set to 57GiB, so the limit should be > 2GiB and <= 57GiB if the query is heavy, right? Yet it's just set to the minimum mem limit.
I know that the limit is set to clamp(min memory limit per query, memory estimated, max memory limit per query), but the estimated memory is 4GB and what makes it stranger is that when I try to define SET MEM_LIMIT in the query to another number like 4G or 8G, the estimated memory changes; which means there's some calculation for the estimated memory based on the memory limit.
And that's why my question is: why can't my daemon use the max-memory-limit that i've set and just set it based on the min-memory-limit?