You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These map is then used in FunctionMetadata#translate to check if the predicate expression will translate into a JdbcExpression
This approach works, but for every new scalar function (or variant with different type parameters), we would need to add a new method in the OperatorTranslators class.
For example, to support INTEGER addition, we would need to add the below method in OperatorTranslators -
@ScalarOperator(ADD)
@SqlType(StandardTypes.INTEGER)
public static JdbcExpression addInteger(@SqlType(StandardTypes.INTEGER) JdbcExpression left, @SqlType(StandardTypes.INTEGER) JdbcExpression right)
{
return new JdbcExpression(infixOperation("+", left, right), forwardBindVariables(left, right));
}
This would need to be repeated for other type variants like DOUBLE, SMALLINT, TINYINT - which gets quite onerous
Change needed
Instead of using methods with Java annotations to build the Map<FunctionMetadata, MethodHandle> we need an easier way to support the common operators that should translate with most Jdbc backends
The text was updated successfully, but these errors were encountered:
Issue
During JDBC predicate pushdown, we parse the OperatorTranslators registry with the TranslatorAnnotationParser#parseFunctionDefinitions to build a
Map<FunctionMetadata, MethodHandle>
These map is then used in FunctionMetadata#translate to check if the predicate expression will translate into a
JdbcExpression
This approach works, but for every new scalar function (or variant with different type parameters), we would need to add a new method in the OperatorTranslators class.
For example, to support
INTEGER
addition, we would need to add the below method inOperatorTranslators
-This would need to be repeated for other type variants like DOUBLE, SMALLINT, TINYINT - which gets quite onerous
Change needed
Instead of using methods with Java annotations to build the
Map<FunctionMetadata, MethodHandle>
we need an easier way to support the common operators that should translate with most Jdbc backendsThe text was updated successfully, but these errors were encountered: