JingsongLi commented on a change in pull request #10396: 
[FLINK-14063][table-planner-blink] Operators use fractions to decide how many 
managed memory to allocate
URL: https://github.com/apache/flink/pull/10396#discussion_r354102282
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/join/SortMergeJoinOperator.java
 ##########
 @@ -158,16 +140,26 @@ public void open() throws Exception {
                this.memManager = 
this.getContainingTask().getEnvironment().getMemoryManager();
                this.ioManager = 
this.getContainingTask().getEnvironment().getIOManager();
 
+               long totalMemory = computeMemorySize();
+               long totalSortMem = totalMemory - externalBufferMemory;
+               if (totalSortMem < 0) {
+                       throw new TableException("Memory size is too small: " +
+                                       totalMemory + ", please increase manage 
memory of task manager.");
+               }
+
+               long sortMemory1 = (long) (totalSortMem * leftMemRatio);
 
 Review comment:
   In `BinaryExternalSorter`, will do this check.
   Actually here, we don't know the minimum memory of algorithm.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to