Use early return
This commit is contained in:
parent
0cf6605b8d
commit
ae7e7578db
@ -35,7 +35,9 @@ function _castColumnToEpoch(columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getColumnsWithWrappedDates(query) {
|
function getColumnsWithWrappedDates(query) {
|
||||||
if (query) {
|
if(!query){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (query.match(/\b_cdb_epoch_transformation\b/)) {
|
if (query.match(/\b_cdb_epoch_transformation\b/)) {
|
||||||
const columns = [];
|
const columns = [];
|
||||||
const fieldMatcher = /\bdate_part\('epoch', "([^"]+)"\) as "([^"]+)"/gmi;
|
const fieldMatcher = /\bdate_part\('epoch', "([^"]+)"\) as "([^"]+)"/gmi;
|
||||||
@ -48,7 +50,6 @@ function getColumnsWithWrappedDates(query) {
|
|||||||
} while (match);
|
} while (match);
|
||||||
return columns;
|
return columns;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
Loading…
Reference in New Issue
Block a user