danny0405 commented on a change in pull request #2095:
URL: https://github.com/apache/calcite/pull/2095#discussion_r466171330
##########
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:
There are many codes in Calcite use assert, should we also eliminate
them ?
----------------------------------------------------------------
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]