Java Code Examples for org.apache.calcite.sql.SqlOperator#getClass()
The following examples show how to use
org.apache.calcite.sql.SqlOperator#getClass() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReflectiveConvertletTable.java From Bats with Apache License 2.0 | 5 votes |
public SqlRexConvertlet get(SqlCall call) { SqlRexConvertlet convertlet; final SqlOperator op = call.getOperator(); // Is there a convertlet for this operator // (e.g. SqlStdOperatorTable.plusOperator)? convertlet = (SqlRexConvertlet) map.get(op); if (convertlet != null) { return convertlet; } // Is there a convertlet for this class of operator // (e.g. SqlBinaryOperator)? Class<?> clazz = op.getClass(); while (clazz != null) { convertlet = (SqlRexConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } // Is there a convertlet for this class of expression // (e.g. SqlCall)? clazz = call.getClass(); while (clazz != null) { convertlet = (SqlRexConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } return null; }
Example 2
Source File: RexSqlReflectiveConvertletTable.java From Bats with Apache License 2.0 | 5 votes |
public RexSqlConvertlet get(RexCall call) { RexSqlConvertlet convertlet; final SqlOperator op = call.getOperator(); // Is there a convertlet for this operator // (e.g. SqlStdOperatorTable.plusOperator)? convertlet = (RexSqlConvertlet) map.get(op); if (convertlet != null) { return convertlet; } // Is there a convertlet for this class of operator // (e.g. SqlBinaryOperator)? Class<? extends Object> clazz = op.getClass(); while (clazz != null) { convertlet = (RexSqlConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } // Is there a convertlet for this class of expression // (e.g. SqlCall)? clazz = call.getClass(); while (clazz != null) { convertlet = (RexSqlConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } return null; }
Example 3
Source File: ReflectiveConvertletTable.java From calcite with Apache License 2.0 | 5 votes |
public SqlRexConvertlet get(SqlCall call) { SqlRexConvertlet convertlet; final SqlOperator op = call.getOperator(); // Is there a convertlet for this operator // (e.g. SqlStdOperatorTable.plusOperator)? convertlet = (SqlRexConvertlet) map.get(op); if (convertlet != null) { return convertlet; } // Is there a convertlet for this class of operator // (e.g. SqlBinaryOperator)? Class<?> clazz = op.getClass(); while (clazz != null) { convertlet = (SqlRexConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } // Is there a convertlet for this class of expression // (e.g. SqlCall)? clazz = call.getClass(); while (clazz != null) { convertlet = (SqlRexConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } return null; }
Example 4
Source File: RexSqlReflectiveConvertletTable.java From calcite with Apache License 2.0 | 5 votes |
public RexSqlConvertlet get(RexCall call) { RexSqlConvertlet convertlet; final SqlOperator op = call.getOperator(); // Is there a convertlet for this operator // (e.g. SqlStdOperatorTable.plusOperator)? convertlet = (RexSqlConvertlet) map.get(op); if (convertlet != null) { return convertlet; } // Is there a convertlet for this class of operator // (e.g. SqlBinaryOperator)? Class<? extends Object> clazz = op.getClass(); while (clazz != null) { convertlet = (RexSqlConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } // Is there a convertlet for this class of expression // (e.g. SqlCall)? clazz = call.getClass(); while (clazz != null) { convertlet = (RexSqlConvertlet) map.get(clazz); if (convertlet != null) { return convertlet; } clazz = clazz.getSuperclass(); } return null; }