فهرست منبع

HUE-1649 [beeswax] Autocomplete error

Fixed case for WHERE on new lines and added keywords for the end of queries
Enrico Berti 12 سال پیش
والد
کامیت
6ed196050e
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      apps/beeswax/src/beeswax/templates/execute.mako
  2. 1 1
      desktop/core/static/js/codemirror-hql-hint.js

+ 1 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -815,7 +815,7 @@ ${layout.menubar(section='query')}
       function fieldsAutocomplete(cm) {
         CodeMirror.possibleSoloField = true;
         try {
-          var _possibleTables = $.trim(codeMirror.getValue().substr(codeMirror.getValue().toUpperCase().indexOf("FROM ") + 4)).split(" ");
+          var _possibleTables = $.trim(codeMirror.getValue(" ").substr(codeMirror.getValue().toUpperCase().indexOf("FROM ") + 4)).split(" ");
           var _foundTable = "";
           for (var i = 0; i < _possibleTables.length; i++) {
             if ($.trim(_possibleTables[i]) != "" && _foundTable == "") {

+ 1 - 1
desktop/core/static/js/codemirror-hql-hint.js

@@ -72,7 +72,7 @@
   var hiveQLKeywordsU = hiveQLKeywords.split(" ");
   var hiveQLKeywordsL = hiveQLKeywords.toLowerCase().split(" ");
 
-  var hiveQLKeywordsAfterTables = "JOIN ON WHERE";
+  var hiveQLKeywordsAfterTables = "JOIN ON WHERE ORDER BY ASC DESC LIMIT";
   var hiveQLKeywordsAfterTablesU = hiveQLKeywordsAfterTables.split(" ");
   var hiveQLKeywordsAfterTablesL = hiveQLKeywordsAfterTables.toLowerCase().split(" ");