public MetricDesc(int index, AggregatorFactory factory) { this.index = index; this.name = factory.getName(); String typeInfo = factory.getTypeName(); this.capabilities = new ColumnCapabilitiesImpl(); if ("float".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.FLOAT); this.type = typeInfo; } else if ("long".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.LONG); this.type = typeInfo; } else if ("double".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.DOUBLE); this.type = typeInfo; } else { capabilities.setType(ValueType.COMPLEX); this.type = ComplexMetrics.getSerdeForType(typeInfo).getTypeName(); } }
public MetricDesc(int index, AggregatorFactory factory) { this.index = index; this.name = factory.getName(); String typeInfo = factory.getTypeName(); this.capabilities = new ColumnCapabilitiesImpl(); if ("float".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.FLOAT); this.type = typeInfo; } else if ("long".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.LONG); this.type = typeInfo; } else if ("double".equalsIgnoreCase(typeInfo)) { capabilities.setType(ValueType.DOUBLE); this.type = typeInfo; } else { capabilities.setType(ValueType.COMPLEX); this.type = ComplexMetrics.getSerdeForType(typeInfo).getTypeName(); } }