bool satisfy()

in cpp/src/reader/filter/between.h [40:97]


    bool satisfy(Statistic *statistic) {
        if (type_ == TIME_FILTER) {
            if (not_) {
                return statistic->end_time_ < value1_ ||
                       statistic->start_time_ > value2_;
            } else {
                return statistic->end_time_ >= value1_ &&
                       statistic->start_time_ <= value2_;
            }
        } else {
            if (statistic->get_type() == common::TEXT ||
                statistic->get_type() == common::BOOLEAN) {
                return true;
            } else {
                if (statistic->get_type() == common::INT32) {
                    Int32Statistic *stat =
                        dynamic_cast<Int32Statistic *>(statistic);
                    if (not_) {
                        return ((stat->min_value_ < value1_) ||
                                (stat->max_value_ > value2_));
                    } else {
                        return ((stat->max_value_ >= value1_) &&
                                (stat->min_value_ <= value2_));
                    }
                } else if (statistic->get_type() == common::INT64) {
                    Int64Statistic *stat =
                        dynamic_cast<Int64Statistic *>(statistic);
                    if (not_) {
                        return ((stat->min_value_ < value1_) ||
                                (stat->max_value_ > value2_));
                    } else {
                        return ((stat->max_value_ >= value1_) &&
                                (stat->min_value_ <= value2_));
                    }
                } else if (statistic->get_type() == common::FLOAT) {
                    FloatStatistic *stat =
                        dynamic_cast<FloatStatistic *>(statistic);
                    if (not_) {
                        return ((stat->min_value_ < value1_) ||
                                (stat->max_value_ > value2_));
                    } else {
                        return ((stat->max_value_ >= value1_) &&
                                (stat->min_value_ <= value2_));
                    }
                } else if (statistic->get_type() == common::DOUBLE) {
                    DoubleStatistic *stat =
                        dynamic_cast<DoubleStatistic *>(statistic);
                    if (not_) {
                        return ((stat->min_value_ < value1_) ||
                                (stat->max_value_ > value2_));
                    } else {
                        return ((stat->max_value_ >= value1_) &&
                                (stat->min_value_ <= value2_));
                    }
                }
            }
        }
    }