package com.purui.prims.headless.core.translator.calcite.s2sql;

import com.purui.prims.common.pojo.enums.AggOperatorEnum;
import lombok.Data;

import java.util.List;

@Data
public class MetricTypeParams {

    private List<Measure> measures;
    private List<Measure> metrics;
    private List<Measure> fields;
    private boolean isFieldMetric = false;
    private String expr;
    private String operations;
    // 是否同环比
    public boolean isRollOver() {
        if (AggOperatorEnum.RATIO_ROLL.name().equalsIgnoreCase(operations) || AggOperatorEnum.RATIO_OVER.name().equalsIgnoreCase(operations)) {
            return true;
        }
        return false;
    }
}
