@JsonCreator public CardinalityAggregatorFactory( @JsonProperty("name") String name, @Deprecated @JsonProperty("fieldNames") final List<String> fieldNames, @JsonProperty("fields") final List<DimensionSpec> fields, @JsonProperty("byRow") final boolean byRow, @JsonProperty("round") final boolean round ) { this.name = name; // 'fieldNames' is deprecated, since CardinalityAggregatorFactory now accepts DimensionSpecs instead of Strings. // The old 'fieldNames' is still supported for backwards compatibility, but the user is not allowed to specify both // 'fields' and 'fieldNames'. if (fields == null) { Preconditions.checkArgument(fieldNames != null, "Must provide 'fieldNames' if 'fields' is null."); this.fields = makeFieldsFromFieldNames(fieldNames); } else { Preconditions.checkArgument(fieldNames == null, "Cannot specify both 'fieldNames' and 'fields."); this.fields = fields; } this.byRow = byRow; this.round = round; }
@JsonCreator public CardinalityAggregatorFactory( @JsonProperty("name") String name, @Deprecated @JsonProperty("fieldNames") final List<String> fieldNames, @JsonProperty("fields") final List<DimensionSpec> fields, @JsonProperty("byRow") final boolean byRow, @JsonProperty("round") final boolean round ) { this.name = name; // 'fieldNames' is deprecated, since CardinalityAggregatorFactory now accepts DimensionSpecs instead of Strings. // The old 'fieldNames' is still supported for backwards compatibility, but the user is not allowed to specify both // 'fields' and 'fieldNames'. if (fields == null) { Preconditions.checkArgument(fieldNames != null, "Must provide 'fieldNames' if 'fields' is null."); this.fields = makeFieldsFromFieldNames(fieldNames); } else { Preconditions.checkArgument(fieldNames == null, "Cannot specify both 'fieldNames' and 'fields."); this.fields = fields; } this.byRow = byRow; this.round = round; }