Fix bug in date-wrapper regarding to columns with spaces
This commit is contained in:
@@ -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 `;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user