1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Wrong power of 2 in esimator` (#2088)

This commit is contained in:
Leonid Fedorov
2021-08-18 19:48:48 +03:00
committed by GitHub
parent a2f441cd9c
commit dcacbbd3a9

View File

@ -159,16 +159,16 @@ uint32_t RowEstimator::estimateDistinctValues(const execplan::CalpontSystemCatal
// Return limit/2 for integers where limit is number of possible values.
case CalpontSystemCatalog::TINYINT:
return (2 ^ 8) / 2;
return (1 << 8) / 2;
case CalpontSystemCatalog::UTINYINT:
return (2 ^ 8);
return (1 << 8);
case CalpontSystemCatalog::SMALLINT:
return (2 ^ 16) / 2;
return (1 << 16) / 2;
case CalpontSystemCatalog::USMALLINT:
return (2 ^ 16);
return (1 << 16);
// Next group all have range greater than 8M (# of rows in an extent), use 8M/2 as the estimate.
case CalpontSystemCatalog::MEDINT: