Remove safe limit

This commit is contained in:
Daniel García Aubert 2019-08-23 18:04:19 +02:00
parent d4d981909b
commit 9a85b661b0

View File

@ -132,9 +132,7 @@ function _sample(ctx) {
return Promise.resolve();
}
// We'll use a safety limit just in case numRows is a bad estimate
const requestedRows = ctx.metaOptions.sample.num_rows || DEFAULT_SAMPLE_ROWS;
const limit = Math.ceil(requestedRows * 1.5);
const limit = ctx.metaOptions.sample.num_rows || DEFAULT_SAMPLE_ROWS;
const columns = ctx.metaOptions.sample.include_columns;
const sqlMaxMin = _getSQL(ctx, sql => queryUtils.getMaxMinSpanColumnQuery(sql));