Class FederationExpressionParser
- java.lang.Object
-
- com.amazonaws.athena.connectors.jdbc.manager.FederationExpressionParser
-
- Direct Known Subclasses:
BigQueryFederationExpressionParser
,DefaultJdbcFederationExpressionParser
,JdbcFederationExpressionParser
public abstract class FederationExpressionParser extends Object
-
-
Constructor Summary
Constructors Constructor Description FederationExpressionParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
mapFunctionToDataSourceSyntax(FunctionName functionName, org.apache.arrow.vector.types.pojo.ArrowType type, List<String> arguments)
Each datasource has different syntax for various operations, quotes, etc.List<String>
parseComplexExpressions(List<org.apache.arrow.vector.types.pojo.Field> columns, Constraints constraints, List<TypeAndValue> accumulator)
String
parseConstantExpression(ConstantExpression constantExpression, List<TypeAndValue> accumulator)
String
parseFunctionCallExpression(FunctionCallExpression functionCallExpression, List<TypeAndValue> accumulator)
This is a recursive function, as function calls can have arguments which, themselves, are function calls.String
parseVariableExpression(VariableExpression variableExpression)
Various connectors have different standards for wrapping column names in some specific quote character.
-
-
-
Method Detail
-
mapFunctionToDataSourceSyntax
public abstract String mapFunctionToDataSourceSyntax(FunctionName functionName, org.apache.arrow.vector.types.pojo.ArrowType type, List<String> arguments)
Each datasource has different syntax for various operations, quotes, etc. This is the only method a subclass to implement, and otherwise will just invoke parseComplexExpressions.
-
parseComplexExpressions
public List<String> parseComplexExpressions(List<org.apache.arrow.vector.types.pojo.Field> columns, Constraints constraints, List<TypeAndValue> accumulator)
-
parseFunctionCallExpression
public String parseFunctionCallExpression(FunctionCallExpression functionCallExpression, List<TypeAndValue> accumulator)
This is a recursive function, as function calls can have arguments which, themselves, are function calls.- Parameters:
functionCallExpression
-- Returns:
-
parseConstantExpression
public String parseConstantExpression(ConstantExpression constantExpression, List<TypeAndValue> accumulator)
-
parseVariableExpression
public String parseVariableExpression(VariableExpression variableExpression)
Various connectors have different standards for wrapping column names in some specific quote character. This default implementation just returns the column name for connectors that don't have this specification.
-
-