danny0405 commented on a change in pull request #2095:
URL: https://github.com/apache/calcite/pull/2095#discussion_r466268939
##########
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:
`No, I think generally assertions are a valid mechanism` I'm not
convinced by this, we may need to reorganize our assertion usage. Can you log
an issue there ?
----------------------------------------------------------------
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]