Fix bug in date-wrapper regarding to columns with spaces

This commit is contained in:
Jesús Arroyo Torrens
2018-08-16 13:38:26 +02:00
parent 14cf3c1093
commit 925328c43b
+1 -1
View File
@@ -14,7 +14,7 @@ const DATE_OIDS = Object.freeze({
function wrapDates(originalQuery, fields) {
return `
SELECT
${fields.map(field => _isDateType(field) ? _castColumnToEpoch(field.name) : `${field.name}`).join(',')}
${fields.map(field => _isDateType(field) ? _castColumnToEpoch(field.name) : `"${field.name}"`).join(',')}
FROM
(${originalQuery}) _cdb_epoch_transformation `;
}