shigarg1 commented on issue #17284:
URL: https://github.com/apache/druid/issues/17284#issuecomment-2402530249

   Hi @abhishekagarwal87 
   Facing issue with array as inputs
   SELECT JSON_MERGE_AGGR('ADD', '{"c": [2,3]}', '{"c": [4,5]}')
   
   what should be result for this ?
   There are 3 options
   1. '{"c": [4,5]}'. // take the rightmost value
   2. '{"c": [2,3,4,5]}' // this is currently being done by json_merge
   3. '{"c": [6,8]}' 
   
   If we go by 3, then if array size is different do we copy the extra values? 
   ex - ADD([2,3,7] , [2,3]) -> [4,6,7]
   
   Also want to check if json_merge behavior is expected for array values ? In 
docs it mentions - "Preserves the rightmost value when there are key overlaps". 
In that case it should choose option1 and not 2.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to