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

   ## What is the purpose of the change
   
   This is an implementation of MAP_UNION 
   
   Returns a map created by merging at least one map. These maps should have a 
common map type. If there are overlapping keys, the value from 'map2' will 
overwrite the value from 'map1',  the value from 'map3' will overwrite the 
value from 'map2',  the value from 'mapn' will overwrite the value from 
'map(n-1)'. If any of maps is null, return null.
   
   ## Brief change log
   MAP_UNION for Table API and SQL
   
   - Syntax:
   `MAP_UNION(map1, ...)`
   - Arguments:
   map1:The first map to be merged.
   map2:The second map to be merged.
   mapn: the n map to be merged
   - Returns: If there are overlapping keys, the value from 'map2' will 
overwrite the value from 'map1',  the value from 'map3' will overwrite the 
value from 'map2',  the value from 'mapn' will overwrite the value from 
'map(n-1)'. If any of maps is null, return null.
   - Examples:
   
   Merging maps with unique keys:
   ```
   map1 = ['a': 1, 'b': 2] map2 = ['c': 3, 'd': 4] 
   map_union(map1, map2)  
   Output: ['a': 1, 'b': 2, 'c': 3, 'd': 4]
   ```
   
   Merging maps with overlapping keys:
   ```
   map1 = ['a': 1, 'b': 2] map2 = ['b': 3, 'c': 4] 
   map_union(map1, map2) 
   Output: ['a': 1, 'b': 3, 'c': 4]
   ```
   
   ## Verifying this change
   - This change added tests in MapFunctionITCase.
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / no)
     - The serializers: (yes / no / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / no / 
don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
     - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs 
/ not documented)
   


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to