You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by al...@apache.org on 2020/04/09 06:49:07 UTC

[zeppelin] branch branch-0.9 updated: [ZEPPELIN-4735]. Fail to getCompletion when interpreter doesn't implement completion

This is an automated email from the ASF dual-hosted git repository.

alexott pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new 03ba350  [ZEPPELIN-4735]. Fail to getCompletion when interpreter doesn't implement completion
03ba350 is described below

commit 03ba3502fba76b5d6a1ac826bcbf24f2f38d325d
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Wed Apr 8 17:54:13 2020 +0800

    [ZEPPELIN-4735]. Fail to getCompletion when interpreter doesn't implement completion
    
    ### What is this PR for?
    
    Trivial PR which only return empty list instead of null.
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-4735
    
    ### How should this be tested?
    * Manually tested
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Jeff Zhang <zj...@apache.org>
    
    Closes #3726 from zjffdu/ZEPPELIN-4735 and squashes the following commits:
    
    4efb2a96f [Jeff Zhang] address comment
    1a534ace9 [Jeff Zhang] [ZEPPELIN-4735]. Fail to getCompletion when interpreter doesn't implement completion
    
    (cherry picked from commit ec2f03f2acc37174de38a59b7da3520ebc344e33)
    Signed-off-by: Alex Ott <al...@apache.org>
---
 .../src/main/java/org/apache/zeppelin/interpreter/Interpreter.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
index e38a84b..ceaa314 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
@@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
 import java.lang.reflect.Field;
 import java.net.URL;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -156,7 +157,7 @@ public abstract class Interpreter {
   @ZeppelinApi
   public List<InterpreterCompletion> completion(String buf, int cursor,
       InterpreterContext interpreterContext) throws InterpreterException {
-    return null;
+    return Collections.emptyList();
   }
 
   /**