Use template string for nullsQueryTpl

This commit is contained in:
Daniel García Aubert 2017-09-05 12:18:42 +02:00
parent 151bdec1fd
commit f1018f3272

View File

@ -124,14 +124,14 @@ const overrideBinsQueryTpl = ctx => `
)
`;
var nullsQueryTpl = dot.template([
'__cdb_nulls AS (',
' SELECT',
' count(*) AS __cdb_nulls_count',
' FROM ({{=it._query}}) __cdb_histogram_nulls',
' WHERE {{=it._column}} IS NULL',
')'
].join('\n'));
const nullsQueryTpl = ctx => `
__cdb_nulls AS (
SELECT
count(*) AS __cdb_nulls_count
FROM (${it._query}) __cdb_histogram_nulls
WHERE ${it._column} IS NULL
)
`;
var infinitiesQueryTpl = dot.template([
'__cdb_infinities AS (',