瀏覽代碼

filter NULL values for column value suggestions

Sven Klemm 7 年之前
父節點
當前提交
9dbdc29118
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      public/app/plugins/datasource/postgres/meta_query.ts

+ 1 - 0
public/app/plugins/datasource/postgres/meta_query.ts

@@ -144,6 +144,7 @@ table_schema IN (
     let query = 'SELECT DISTINCT quote_literal(' + column + ')';
     query += ' FROM ' + this.target.table;
     query += ' WHERE $__timeFilter(' + this.target.timeColumn + ')';
+    query += ' AND ' + column + ' IS NOT NULL';
     query += ' ORDER BY 1 LIMIT 100';
     return query;
   }