You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/07/07 02:28:28 UTC
zeppelin git commit: [ZEPPELIN-1121] Bugfix pyspark autocompletion.
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

- after

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: astroshim <hs...@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 <hs...@nflabs.com>
Authored: Tue Jul 5 23:51:55 2016 +0900
Committer: Alexander Bezzubov <bz...@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) {