rubenada commented on a change in pull request #2095:
URL: https://github.com/apache/calcite/pull/2095#discussion_r466679069



##########
File path: 
core/src/main/java/org/apache/calcite/rel/metadata/ReflectiveRelMetadataProvider.java
##########
@@ -78,7 +78,9 @@ protected ReflectiveRelMetadataProvider(
       ConcurrentMap<Class<RelNode>, UnboundMetadata> map,
       Class<? extends Metadata> metadataClass0,
       Multimap<Method, MetadataHandler> handlerMap) {
-    assert !map.isEmpty() : "are your methods named wrong?";
+    if (map.isEmpty()) {
+      throw new IllegalArgumentException("ReflectiveRelMetadataProvider 
methods map is empty");

Review comment:
       Thanks for the feedback @amaliujia , you are right, I am considering 
open a follow-up PR to change it into `Preconditions.checkArgument`




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