Use template string for nansQueryTpl

This commit is contained in:
Daniel García Aubert 2017-09-05 15:53:06 +02:00
parent 734cfa6d83
commit adcff54589

View File

@ -145,14 +145,14 @@ const infinitiesQueryTpl = ctx => `
)
`;
var nansQueryTpl = dot.template([
'__cdb_nans AS (',
' SELECT',
' count(*) AS __cdb_nans_count',
' FROM ({{=it._query}}) __cdb_nans_query',
' WHERE {{=it._column}} = \'NaN\'::float',
')'
].join('\n'));
const nansQueryTpl = ctx => `
__cdb_nans AS (
SELECT
count(*) AS __cdb_nans_count
FROM (${ctx._query}) __cdb_nans_query
WHERE ${ctx._column} = 'NaN'::float
)
`;
var histogramQueryTpl = dot.template([
'SELECT',