示例#1
0
 RelNode toRel(Queryable<T> queryable) {
   if (queryable instanceof QueryableDefaults.Replayable) {
     //noinspection unchecked
     ((QueryableDefaults.Replayable) queryable).replay(this);
     return rel;
   }
   if (queryable instanceof Table) {
     final OptiqPrepareImpl.RelOptTableImpl relOptTable =
         new OptiqPrepareImpl.RelOptTableImpl(
             null, ((Table) queryable).getRowType(), new String[0], (Table) queryable);
     if (queryable instanceof TranslatableTable) {
       return ((TranslatableTable) queryable).toRel(translator, relOptTable);
     } else {
       return new TableAccessRel(translator.cluster, relOptTable);
     }
   }
   return translator.translate(queryable.getExpression());
 }
示例#2
0
 public <T> PrepareResult<T> prepareQueryable(Context context, Queryable<T> queryable) {
   return prepare_(context, null, queryable, queryable.getElementType());
 }