Repository: zeppelin Updated Branches: refs/heads/master c6fcb3b2f -> ca78995fd
[ZEPPELIN-1121] Bugfix pyspark autocompletion. ### What is this PR for? This PR fixes autocompletion for pyspark interpreter bug. ### What type of PR is it? Bug Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1121 ### How should this be tested? try to completion for pyspark interpreter on your paragraph. ### Screenshots (if appropriate) - before ![before](https://cloud.githubusercontent.com/assets/3348133/16589456/31464398-430e-11e6-87f0-a9446d5c5c14.gif) - after ![after](https://cloud.githubusercontent.com/assets/3348133/16589462/39540b74-430e-11e6-9e2b-0f23ed373521.gif) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: astroshim <hss...@nflabs.com> Closes #1136 from astroshim/ZEPPELIN-1121 and squashes the following commits: 4ef1117 [astroshim] fix pyspark autocompletion code. Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/ca78995f Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/ca78995f Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/ca78995f Branch: refs/heads/master Commit: ca78995fd15a34cf749626293ec966951d4d5f3a Parents: c6fcb3b Author: astroshim <hss...@nflabs.com> Authored: Tue Jul 5 23:51:55 2016 +0900 Committer: Alexander Bezzubov <b...@apache.org> Committed: Thu Jul 7 11:28:23 2016 +0900 ---------------------------------------------------------------------- .../java/org/apache/zeppelin/spark/PySparkInterpreter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ca78995f/spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java ---------------------------------------------------------------------- diff --git a/spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java b/spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java index df9db43..43462ad 100644 --- a/spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java +++ b/spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java @@ -443,8 +443,12 @@ public class PySparkInterpreter extends Interpreter implements ExecuteResultHand //end code for completion Gson gson = new Gson(); - - return gson.fromJson(completionResult.message(), LinkedList.class); + String[] completionList = gson.fromJson(completionResult.message(), String[].class); + List<InterpreterCompletion> results = new LinkedList<>(); + for (String name: completionList) { + results.add(new InterpreterCompletion(name, name)); + } + return results; } private String getCompletionTargetString(String text, int cursor) {