Skip to content

Commit

Permalink
Minor indentation and comment typo fixes.
Browse files Browse the repository at this point in the history
Author: Aaron Staple <astaple@gmail.com>

Closes apache#1630 from staple/minor and squashes the following commits:

6f295a2 [Aaron Staple] Fix typos in comment about ExprId.
8566467 [Aaron Staple] Fix off by one column indentation in SqlParser.
  • Loading branch information
staple authored and rxin committed Jul 29, 2014
1 parent 20424da commit fc4d057
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,21 @@ class SqlParser extends StandardTokenParsers with PackratParsers {
} |
"(" ~> query ~ ")" ~ opt(AS) ~ ident ^^ { case s ~ _ ~ _ ~ a => Subquery(a, s) }

protected lazy val joinedRelation: Parser[LogicalPlan] =
relationFactor ~ opt(joinType) ~ JOIN ~ relationFactor ~ opt(joinConditions) ^^ {
protected lazy val joinedRelation: Parser[LogicalPlan] =
relationFactor ~ opt(joinType) ~ JOIN ~ relationFactor ~ opt(joinConditions) ^^ {
case r1 ~ jt ~ _ ~ r2 ~ cond =>
Join(r1, r2, joinType = jt.getOrElse(Inner), cond)
}
}

protected lazy val joinConditions: Parser[Expression] =
ON ~> expression
protected lazy val joinConditions: Parser[Expression] =
ON ~> expression

protected lazy val joinType: Parser[JoinType] =
INNER ^^^ Inner |
LEFT ~ SEMI ^^^ LeftSemi |
LEFT ~ opt(OUTER) ^^^ LeftOuter |
RIGHT ~ opt(OUTER) ^^^ RightOuter |
FULL ~ opt(OUTER) ^^^ FullOuter
protected lazy val joinType: Parser[JoinType] =
INNER ^^^ Inner |
LEFT ~ SEMI ^^^ LeftSemi |
LEFT ~ opt(OUTER) ^^^ LeftOuter |
RIGHT ~ opt(OUTER) ^^^ RightOuter |
FULL ~ opt(OUTER) ^^^ FullOuter

protected lazy val filter: Parser[Expression] = WHERE ~ expression ^^ { case _ ~ e => e }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ object NamedExpression {
}

/**
* A globally (within this JVM) id for a given named expression.
* Used to identify with attribute output by a relation is being
* A globally unique (within this JVM) id for a given named expression.
* Used to identify which attribute output by a relation is being
* referenced in a subsequent computation.
*/
case class ExprId(id: Long)
Expand Down

0 comments on commit fc4d057

Please sign in to comment.