use of org.apache.calcite.sql2rel.SqlRexConvertlet in project drill by apache.
the class DrillConvertletTable method get.
/*
* Lookup the hash table to see if we have a custom convertlet for a given
* operator, if we don't use StandardConvertletTable.
*/
@Override
public SqlRexConvertlet get(SqlCall call) {
SqlRexConvertlet convertlet;
if (call.getOperator() instanceof DrillCalciteSqlWrapper) {
final SqlOperator wrapper = call.getOperator();
final SqlOperator wrapped = DrillCalciteWrapperUtility.extractSqlOperatorFromWrapper(call.getOperator());
if ((convertlet = map.get(wrapped)) != null) {
return convertlet;
}
((SqlBasicCall) call).setOperator(wrapped);
SqlRexConvertlet sqlRexConvertlet = StandardConvertletTable.INSTANCE.get(call);
((SqlBasicCall) call).setOperator(wrapper);
return sqlRexConvertlet;
}
if ((convertlet = map.get(call.getOperator())) != null) {
return convertlet;
}
return StandardConvertletTable.INSTANCE.get(call);
}
Aggregations