lsyldliu opened a new pull request, #20365:
URL: https://github.com/apache/flink/pull/20365

   ## What is the purpose of the change
   
   Introducing adaptive hash join for batch sql hash join.  Adaptive hash join 
integrates the advantages of hash join and sorted-merge join according to the 
characteristics of runtime data. The adaptive hash join will try to use hash 
join strategy firstly, if it failed, fall back to sort merge join. It will 
improve the stability  of hash join.
   
   In order to solve the problem of data skew, or too much data in the hash 
table, so here introduce two strategies fallback to sort merge join:
   
   1. If the data spill to disk exceeds the threshold {@code 
TABLE_EXEC_HASH_JOIN_SPILL_THRESHOLD} in the process of build hash table.
   2. If some partitions are spilled to disk more than three times in the 
process of hash join.
   
   
   ## Brief change log
   
     - *If the data spill to disk exceeds the threshold {@code 
TABLE_EXEC_HASH_JOIN_SPILL_THRESHOLD} in the process of build hash table, 
fallback to sort merge join*
     - *If some partitions are spilled to disk more than three times in the 
process of hash join, fallback to sort merge join*
   
   
   ## Verifying this change
   This change added tests and can be verified as follows:
   
     - *Added uint tests in `LongHashTableTest` and `BinaryHashTableTest`*
     - *Added uint tests in `Int2AdaptiveHashJoinOperatorTest`*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)
   


-- 
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]

Reply via email to