소스 검색

HUE-7749 [editor] Don't mark columns from subqueries as missing

Johan Ahlen 8 년 전
부모
커밋
165401f5ad
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 11 - 0
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3912,6 +3912,17 @@
         var token = tokensToVerify.shift();
         var location = token.parseLocation;
 
+        // TODO: Verify columns in subqueries, i.e. 'code' in 'select code from (select * from web_logs) wl, customers c;'
+        if ((location.type === 'column' || location.type === 'complex') && location.tables) {
+          var hasSubQueries = location.tables.some(function (table) {
+            return typeof table.subQuery !== 'undefined';
+          });
+          if (hasSubQueries) {
+            verifyThrottle = window.setTimeout(verify, VERIFY_DELAY);
+            return;
+          }
+        }
+
         adjustColumnLocation(location).done(function () {
           if (location.type === 'column') {
             var possibleAlias;