kfaraz commented on PR #16376:
URL: https://github.com/apache/druid/pull/16376#issuecomment-2092037364

   You mentioned that
   - there probably hasn't been a use case for this so far
   - there are tests in that other PR which test this out
   - there are changes in that other PR which require the Map to be mutable
   
   Hence, it would much simpler for other reviewers to understand this change 
if it came as a part of the other PR.
   
   However, if this needs to go in a separate change, then it must have a test 
that verifies the mutability of the map.
   
   Also, the correct fix for this is not passing a `new HashMap()` into 
`PlannerContext`. The contract of `PlannerContext` must not depend on what a 
caller has provided. In other words, `PlannerContext` itself must ensure that 
the map is mutable irrespective of what has been provided. In the constructor, 
copy over the stuff into a new mutable map.


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