You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-24 08:41:09 +03:00
chore(QA,rules): Added sign-aware getters for min/max PK statistics values and a test for QA with PK-only statistics.
This commit is contained in:
@@ -146,16 +146,36 @@ struct ColumnStatistics
|
||||
return column;
|
||||
}
|
||||
|
||||
bool hasMinValue() const
|
||||
{
|
||||
return minValue != nullptr;
|
||||
}
|
||||
|
||||
bool hasMaxValue() const
|
||||
{
|
||||
return maxValue != nullptr;
|
||||
}
|
||||
|
||||
std::optional<int64_t> getIntMinValue() const
|
||||
{
|
||||
return (minValue) ? std::optional<int64_t>(minValue->val_int()) : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<uint64_t> getUIntMinValue() const
|
||||
{
|
||||
return (minValue) ? std::optional<uint64_t>(minValue->val_uint()) : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<int64_t> getIntMaxValue() const
|
||||
{
|
||||
return (maxValue) ? std::optional<int64_t>(maxValue->val_int()) : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<uint64_t> getUIntMaxValue() const
|
||||
{
|
||||
return (maxValue) ? std::optional<uint64_t>(maxValue->val_uint()) : std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
execplan::SimpleColumn column;
|
||||
std::vector<Histogram_json_hb*> histograms;
|
||||
|
||||
Reference in New Issue
Block a user