You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/08/14 19:10:43 UTC

[GitHub] [calcite] amaliujia commented on a change in pull request #2110: [CALCITE-4177] Throw exception when deserialize SqlOperator fails, do not return null

amaliujia commented on a change in pull request #2110:
URL: https://github.com/apache/calcite/pull/2110#discussion_r470818718



##########
File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
##########
@@ -678,7 +678,8 @@ SqlOperator toOp(Map<String, Object> map) {
     if (class_ != null) {
       return AvaticaUtils.instantiatePlugin(SqlOperator.class, class_);
     }
-    return null;
+    throw new RuntimeException("No operator for " + name + " with kind: "
+        + kind + ", and syntax: " + syntax);

Review comment:
       Will it better to move this exception in `CalciteResource.java`?




----------------------------------------------------------------
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:
users@infra.apache.org