You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/12/26 03:07:39 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

zjffdu opened a new pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003


   ### What is this PR for?
   
   The exception in SparkSqlInterpreter may not have cause, so this PR is to fix the NPE via checking whether the cause is null.
   
   ### What type of PR is it?
   [Bug Fix]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5174
   
   ### How should this be tested?
   * CI pass
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


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



[GitHub] [zeppelin] Reamer commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r550854339



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       Please use the parameterized method.




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



[GitHub] [zeppelin] Reamer commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r550970517



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       You are right.




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



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r552382179



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       You are right, it is supported, I verified it locally, learned new things :)




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



[GitHub] [zeppelin] Reamer commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r550970517



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       ~You are right.~

##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       Hi @zjffdu,
   I was a little bit confused. It is possible to use parameterised methods for exceptions as well.
   Checkout: http://www.slf4j.org/faq.html#paramException
   




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



[GitHub] [zeppelin] Reamer commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r552412031



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       I also learned a lot from the Zeppelin project.




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



[GitHub] [zeppelin] zjffdu commented on pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#issuecomment-753324699


   Will merge if no more comment


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



[GitHub] [zeppelin] asfgit closed pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003


   


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



[GitHub] [zeppelin] zjffdu commented on pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#issuecomment-756505962


   Will merge if no more comment


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



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4003: [ZEPPELIN-5174]. NPE in SparkSqlInterpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4003:
URL: https://github.com/apache/zeppelin/pull/4003#discussion_r550963601



##########
File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkSqlInterpreter.java
##########
@@ -115,14 +115,23 @@ public InterpreterResult internalInterpret(String st, InterpreterContext context
           context.out.flush();
           return new InterpreterResult(Code.ERROR);
         } else {
+          LOGGER.error("Error happens in sql: " + curSql, e);

Review comment:
       The last parameter is Exception, I think we can not use parameterized method here. 




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