本文整理汇总了Java中org.apache.kylin.metadata.model.FunctionDesc.setParameter方法的典型用法代码示例。如果您正苦于以下问题:Java FunctionDesc.setParameter方法的具体用法?Java FunctionDesc.setParameter怎么用?Java FunctionDesc.setParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.kylin.metadata.model.FunctionDesc
的用法示例。
在下文中一共展示了FunctionDesc.setParameter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMeasureSum
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasureSum(String column, String dataType) {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue(column);
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_COLUMN);
FunctionDesc function = new FunctionDesc();
function.setExpression(FunctionDesc.FUNC_SUM);
function.setParameter(parameterDesc);
function.setReturnType(dataType.equals(HiveTableCreator.HiveTypeEnum.HDOUBLE.toString())
? HiveTableCreator.HiveTypeEnum.HDECIMAL.toString()
: dataType);
MeasureDesc result = new MeasureDesc();
result.setName(column + "_SUM");
result.setFunction(function);
return result;
}
示例2: getMeasureCount
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasureCount() {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue("1");
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_CONSTANT);
FunctionDesc function = new FunctionDesc();
function.setExpression(FunctionDesc.FUNC_COUNT);
function.setParameter(parameterDesc);
function.setReturnType(HiveTableCreator.HiveTypeEnum.HBIGINT.toString());
MeasureDesc result = new MeasureDesc();
result.setName("_COUNT_");
result.setFunction(function);
return result;
}
示例3: getMeasureMax
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasureMax(String column, String dataType) {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue(column);
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_COLUMN);
FunctionDesc function = new FunctionDesc();
function.setExpression(FunctionDesc.FUNC_MAX);
function.setParameter(parameterDesc);
function.setReturnType(dataType);
MeasureDesc result = new MeasureDesc();
result.setName(column + "_MAX");
result.setFunction(function);
return result;
}
示例4: getMeasureMin
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasureMin(String column, String dataType) {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue(column);
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_COLUMN);
FunctionDesc function = new FunctionDesc();
function.setExpression(FunctionDesc.FUNC_MIN);
function.setParameter(parameterDesc);
function.setReturnType(dataType);
MeasureDesc result = new MeasureDesc();
result.setName(column + "_MIN");
result.setFunction(function);
return result;
}
示例5: getMeasureHLL
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasureHLL(String column) {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue(column);
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_COLUMN);
FunctionDesc function = new FunctionDesc();
function.setExpression(FunctionDesc.FUNC_COUNT_DISTINCT);
function.setParameter(parameterDesc);
function.setReturnType("hllc12");
MeasureDesc result = new MeasureDesc();
result.setName(column + "_HLL");
result.setFunction(function);
return result;
}
示例6: getMeasurePercentile
import org.apache.kylin.metadata.model.FunctionDesc; //导入方法依赖的package包/类
public static MeasureDesc getMeasurePercentile(String column) {
ParameterDesc parameterDesc = new ParameterDesc();
parameterDesc.setValue(column);
parameterDesc.setType(FunctionDesc.PARAMETER_TYPE_COLUMN);
FunctionDesc function = new FunctionDesc();
function.setExpression(PercentileMeasureType.FUNC_PERCENTILE);
function.setParameter(parameterDesc);
function.setReturnType("percentile(100)");
MeasureDesc result = new MeasureDesc();
result.setName(column + "_PERCENTILE");
result.setFunction(function);
return result;
}