rubenada opened a new pull request #2095:
URL: https://github.com/apache/calcite/pull/2095


   Jira ticket: 
[CALCITE-4156](https://issues.apache.org/jira/browse/CALCITE-4156)
   
   ReflectiveRelMetadataProvider's constructor verifies that it is not created 
with an empty map, using an assertion. However, this is not the most reliable 
way of verifying this situation, since assertions can be deactivated. In such 
scenario, we could silently end up having an invalid 
ReflectiveRelMetadataProvider, with no actual methods attached.
   Also, since the map is private and has no getter, there is no way for a 
caller module to verify this situation on its side.
   For this reason, it is proposed a minor change: replace the assertion with 
an IllegalArgumentException, which will work in 100% of the cases and will 
always prevent constructing an invalid ReflectiveRelMetadataProvider.


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


Reply via email to