Skip to content

Commit

Permalink
Merge pull request #527 from EverythingMe/fix/filters_for_bq
Browse files Browse the repository at this point in the history
Fix: support for filters in BigQuery.
  • Loading branch information
arikfr committed Aug 9, 2015
2 parents ab507f0 + 7187b5f commit 650ccac
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions rd_ui/app/scripts/services/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,16 @@
}

QueryResult.prototype.getColumnNameWithoutType = function (column) {
var parts = column.split('::');
var typeSplit;
if (column.indexOf("::") != -1) {
typeSplit = "::";
} else if (column.indexOf("__" != -1)) {
typeSplit = "__";
} else {
return column;
}

var parts = column.split(typeSplit);
if (parts[0] == "" && parts.length == 2) {
return parts[1];
}
Expand Down Expand Up @@ -315,7 +324,7 @@
var filters = [];
var filterTypes = ['filter', 'multi-filter'];
_.each(this.getColumnNames(), function (col) {
var type = col.split('::')[1]
var type = col.split('::')[1] || col.split('__')[1];
if (_.contains(filterTypes, type)) {
// filter found
var filter = {
Expand Down

0 comments on commit 650ccac

Please sign in to comment.