return"select "+((QIRLambda)qirProject.formatter).body.accept(this)+" from ("+qirProject.child.accept(this)+") as "+((QIRLambda)qirProject.formatter).var.accept(this);
thrownewQIRException("QIR SQL Project not implemented for formatter type: "+qirProject.formatter.getClass());
if(qirProject.getFormatter()instanceofQIRLambda)
return"select "+((QIRLambda)qirProject.getFormatter()).getBody().accept(this)+" from ("+qirProject.getChild().accept(this)+") as "+
thrownewQIRException("Subquery for another database detected.");
return"select * from "+qirScan.table.accept(this);
return"select * from "+qirScan.getTable().accept(this);
}
thrownewQIRException("QIR SQL Scan not implemented for table type: "+qirScan.table.getClass());
thrownewQIRException("QIR SQL Scan not implemented for table type: "+qirScan.getTable().getClass());
}
@Override
publicfinalStringvisit(finalQIRFilterqirFilter){
if(qirFilter.filterinstanceofQIRLambda)
return"select * from ("+qirFilter.child.accept(this)+") as "+((QIRLambda)qirFilter.filter).var.accept(this)+" where "+((QIRLambda)qirFilter.filter).body.accept(this);
thrownewQIRException("QIR SQL Filter not implemented for filter type: "+qirFilter.filter.getClass());
if(qirFilter.getFilter()instanceofQIRLambda)
return"select * from ("+qirFilter.getChild().accept(this)+") as "+((QIRLambda)qirFilter.getFilter()).getVar().accept(this)+" where "+
return"select * from ("+qirJoin.left.accept(this)+") as "+((QIRLambda)qirJoin.filter).var.accept(this)+" inner join ("+qirJoin.right.accept(this)+") as "+
subFun.var.accept(this)+" on "+subFun.body.accept(this);
return"select * from ("+qirJoin.getLeft().accept(this)+") as "+((QIRLambda)qirJoin.getFilter()).getVar().accept(this)+" inner join ("+qirJoin.getRight().accept(this)+
") as "+subFun.getVar().accept(this)+" on "+subFun.getBody().accept(this);
}
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.filter.getClass());
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.getFilter().getClass());
return"select * from ("+qirJoin.left.accept(this)+") as "+((QIRLambda)qirJoin.filter).var.accept(this)+" left join ("+qirJoin.right.accept(this)+") as "+
subFun.var.accept(this)+" on "+subFun.body.accept(this);
return"select * from ("+qirJoin.getLeft().accept(this)+") as "+((QIRLambda)qirJoin.getFilter()).getVar().accept(this)+" left join ("+qirJoin.getRight().accept(this)+") as "+
subFun.getVar().accept(this)+" on "+subFun.getBody().accept(this);
}
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.filter.getClass());
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.getFilter().getClass());
return"select * from ("+qirJoin.left.accept(this)+") as "+((QIRLambda)qirJoin.filter).var.accept(this)+" right join ("+qirJoin.right.accept(this)+") as "+
subFun.var.accept(this)+" on "+subFun.body.accept(this);
return"select * from ("+qirJoin.getLeft().accept(this)+") as "+((QIRLambda)qirJoin.getFilter()).getVar().accept(this)+" right join ("+qirJoin.getRight().accept(this)+
") as "+subFun.getVar().accept(this)+" on "+subFun.getBody().accept(this);
}
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.filter.getClass());
thrownewQIRException("QIR SQL Join not implemented for filter type: "+qirJoin.getFilter().getClass());