فهرست منبع

HUE-8924 [editor] Only show language reference popover for Impala tokens

There's currently no mapping between Hive topics and editor keywords so this disables the feature for any other editor than Impala
Johan Ahlen 6 سال پیش
والد
کامیت
9c04d9372e
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      desktop/core/src/desktop/js/sql/aceLocationHandler.js

+ 5 - 0
desktop/core/src/desktop/js/sql/aceLocationHandler.js

@@ -1216,6 +1216,11 @@ class AceLocationHandler {
       const tokensToVerify = [];
 
       e.data.locations.forEach(location => {
+        if (location.type === 'statementType' && self.snippet.type() !== 'impala') {
+          // We currently only have a good mapping from statement types to impala topics.
+          // TODO: Extract links between Hive topic IDs and statement types
+          return;
+        }
         if (
           ['statement', 'selectList', 'whereClause', 'limitClause'].indexOf(location.type) !== -1 ||
           ((location.type === 'table' || location.type === 'column') &&