Class ConstraintParser
- java.lang.Object
-
- com.amazonaws.athena.connector.validation.ConstraintParser
-
public class ConstraintParser extends Object
This class provides the ability to transform a simple constraint grammar into an instance ofConstraints.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConstraintsparseConstraints(org.apache.arrow.vector.types.pojo.Schema schema, Optional<String> input)This method takes in a table schema and a String representing the set of simple contraints to be ANDed together and applied to that table.
-
-
-
Method Detail
-
parseConstraints
public static Constraints parseConstraints(org.apache.arrow.vector.types.pojo.Schema schema, Optional<String> input)
This method takes in a table schema and a String representing the set of simple contraints to be ANDed together and applied to that table.- Parameters:
schema- The schema of the table in questioninput- A comma-separated constraint String in the form of {field_name}{operator}{value}. The operators must be one of those available inConstraintParser.LogicalOperator. Currently, we only support Boolean, Integer, Floating Point, Decimal, and String operands for this validator's constraints.- Returns:
- a
Constraintsobject populated from the input string, un-constrained if input is not present
-
-