Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,12 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
meta: v.meta,
caption: computeCaption(v.name, v.meta),
score: 300,
// Marks this candidate as coming from the interpreter, so that
// completionSupportWithBackend can tell it apart from ace's own local/keyword
// completions. `meta` cannot serve that purpose: interpreters are free to fill it
// in (SqlCompleter sends schema/table/column), and using it as the discriminator
// made those very suggestions disappear.
fromBackend: true,
});
}
}
Expand Down Expand Up @@ -1084,10 +1090,11 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
let prev = null;

matches = matches.filter(function(item) {
if (!_.isEmpty(item.meta)) {
if (completionListLength !== 0) {
return false;
}
// ZEPPELIN-3001 intent: once the interpreter has answered, hide ace's own local/keyword
// suggestions so the list only shows what the backend knows. Candidates coming from the
// interpreter are always kept - they are the reason it was asked in the first place.
if (!item.fromBackend && completionListLength !== 0) {
return false;
}
let caption = item.snippet || item.caption || item.value;
if (caption === prev) {
Expand Down
Loading