/** * A simple abstract iterator which implements the remove method as unsupported operation. * * @param <T> The type of iterator data. */ @PublicEvolving public abstract class SamplingIterator<T> implements Iterator<T> { @Override public void remove() { throw new UnsupportedOperationException("This operation is not supported."); } }
/** * Interface for calculating metrics over the records being processed. */ @PublicEvolving public interface Statistics { /** * Aggregates statistics for all the rows. * * @param rows to be aggregated. * @return Summary in the form of {@link Row} */ public Row aggregate(List<Row> rows); }
/** * Interface for Validating 'T' properties. */ @PublicEvolving public interface Validator<T> { /** * Initializes the validator. * @throws Exception thrown when there are initialization error. */ public void initialize() throws Exception; /** * Validates the T properties. * * @param value to be validated. * @throws ValidatorException thrown when there are issues with validation. */ public void validate(T value) throws ValidatorException; }
/** * A specification for how {@link RecipePipeline} will process. */ @PublicEvolving public interface RecipeParser extends Serializable { /** * Generates a configured set of {@link Executor} to be executed. * * @return List of {@link Executor}. */ List<Executor> parse() throws DirectiveLoadException, DirectiveNotFoundException, DirectiveParseException; /** * Initialises the directive with a {@link DirectiveContext}. * * @param context, instance of context object or null. */ @Nullable void initialize(DirectiveContext context); }
/** * Class description here. */ @PublicEvolving public class Numeric implements Token { private final LazyNumber value; public Numeric(LazyNumber value) { this.value = value; } @Override public LazyNumber value() { return value; } @Override public TokenType type() { return TokenType.NUMERIC; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.NUMERIC.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Ranges implements Token { private final List<Triplet<Numeric, Numeric, String>> values; public Ranges(List<Triplet<Numeric, Numeric, String>> values) { this.values = values; } @Override public List<Triplet<Numeric, Numeric, String>> value() { return values; } @Override public TokenType type() { return TokenType.RANGES; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); return object; } }
@PublicEvolving public class Properties implements Token { private Map<String, Token> values;
/** * Class description here. */ @PublicEvolving public class DirectiveName implements Token { private String value; public DirectiveName(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.DIRECTIVE_NAME; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.DIRECTIVE_NAME.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Text implements Token { private String value; public Text(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.TEXT; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.TEXT.name()); object.addProperty("value", value); return object; } }
@PublicEvolving public abstract class Sampler<T> { protected final static double EPSILON = 1e-5;
/** * */ @PublicEvolving public class ColumnName implements Token { private String value; public ColumnName(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.COLUMN_NAME; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.COLUMN_NAME.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Expression implements Token { private String value; public Expression(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.EXPRESSION; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.EXPRESSION.name()); object.addProperty("value", value); return object; } }
@PublicEvolving public interface StaticCatalog extends Serializable {
@PublicEvolving public class TextList implements Token { private List<String> values;
@PublicEvolving public class ColumnNameList implements Token { private List<String> values = new ArrayList<>();
@PublicEvolving public class NumericList implements Token { private final List<LazyNumber> values;
@PublicEvolving public interface Token extends Serializable {
@PublicEvolving public interface RecipePipeline<I, O, E> extends Serializable {
@PublicEvolving public interface Compiler {
@PublicEvolving public interface ExecutorContext extends LookupProvider, Serializable {