Prechádzať zdrojové kódy

HUE-8668 [editor] Add table names to syntax checker suggestions

Johan Ahlen 7 rokov pred
rodič
commit
d7734e4b8d

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

@@ -4778,6 +4778,15 @@
           for (var i = 0; i < arguments.length; i++) {
             joined = joined.concat(arguments[i]);
           }
+          if (token.parseLocation.type === 'column') {
+            // Could be a table reference
+            token.parseLocation.tables.forEach(function (table) {
+              if (!table.alias) {
+                // Aliases are added later
+                joined.push(table.identifierChain[table.identifierChain.length - 1]);
+              }
+            });
+          }
           promise.resolve(joined);
         }).fail(promise.reject);
       } else if (token.parseLocation.identifierChain && token.parseLocation.identifierChain.length > 0) {