interpret table names in context of mountPath and basePath (Fixes #198)

I’m on the fence about that; I’ve been trying to use for expressions whenever they’re not too cumbersome. I admit here I’m mixing it up a bit with a for followed by flatMap. Still developing a sense of what works best, I guess.

On Aug 17, 2014, at 18:12, John A. De Goes <notifications@github.com> wrote:

> In src/main/scala/slamdata/engine/sql/ast.scala:
> 
> > +      x2 <- exprLoop(node.expr)
> > +    } yield Proj(x2, node.alias)).flatMap(proj)
> > +
> > +    def relationLoop(node: SqlRelation): F[SqlRelation] = node match {
> > +      case t @ TableRelationAST(_, _) => relation(t)
> > +
> > +      case SubqueryRelationAST(s, alias) =>
> > +        (for {
> > +          s2 <- selectLoop(s)
> > +        } yield SubqueryRelationAST(s2, alias)).flatMap(relation)
> > +
> > +      case CrossRelation(left, right) =>
> > +        (for {
> > +          l2 <- relationLoop(left)
> > +          r2 <- relationLoop(right)
> > +        } yield CrossRelation(l2, r2)).flatMap(relation)
> 
> Remember applicatives can be used here, e.g.:
> 
> (relationLoop(left) |@| relationLoop(right))(CrossRelation(_, _)).flatMap(relation)
> —
> Reply to this email directly or view it on GitHub.
>