Skip to content

Commit

Permalink
edit empty lines and spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
fjiang6 committed Jul 29, 2015
1 parent dd70763 commit e693c54
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ class SqlParser extends AbstractSparkSQLParser with DataTypeParser {

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

protected lazy val sortType: Parser[LogicalPlan => LogicalPlan] =
Expand Down Expand Up @@ -222,9 +222,9 @@ class SqlParser extends AbstractSparkSQLParser with DataTypeParser {

protected lazy val comparisonExpression: Parser[Expression] =
( termExpression ~ ("=" ~> termExpression) ^^ { case e1 ~ e2 => EqualTo(e1, e2) }
| termExpression ~ ("<" ~> termExpression) ^^ { case e1 ~ e2 => LessThan(e1, e2) }
| termExpression ~ ("<" ~> termExpression) ^^ { case e1 ~ e2 => LessThan(e1, e2) }
| termExpression ~ ("<=" ~> termExpression) ^^ { case e1 ~ e2 => LessThanOrEqual(e1, e2) }
| termExpression ~ (">" ~> termExpression) ^^ { case e1 ~ e2 => GreaterThan(e1, e2) }
| termExpression ~ (">" ~> termExpression) ^^ { case e1 ~ e2 => GreaterThan(e1, e2) }
| termExpression ~ (">=" ~> termExpression) ^^ { case e1 ~ e2 => GreaterThanOrEqual(e1, e2) }
| termExpression ~ ("!=" ~> termExpression) ^^ { case e1 ~ e2 => Not(EqualTo(e1, e2)) }
| termExpression ~ ("<>" ~> termExpression) ^^ { case e1 ~ e2 => Not(EqualTo(e1, e2)) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,29 +263,29 @@ package object dsl {
case e => Alias(e, e.toString)()
}
Aggregate(groupingExprs, aliasedExprs, logicalPlan)
}
}

def subquery(alias: Symbol): LogicalPlan = Subquery(alias.name, logicalPlan)
def subquery(alias: Symbol): LogicalPlan = Subquery(alias.name, logicalPlan)

def except(otherPlan: LogicalPlan): LogicalPlan = Except(logicalPlan, otherPlan)
def except(otherPlan: LogicalPlan): LogicalPlan = Except(logicalPlan, otherPlan)

def intersect(otherPlan: LogicalPlan): LogicalPlan = Intersect(logicalPlan, otherPlan)
def intersect(otherPlan: LogicalPlan): LogicalPlan = Intersect(logicalPlan, otherPlan)

def unionAll(otherPlan: LogicalPlan): LogicalPlan = Union(logicalPlan, otherPlan)
def unionAll(otherPlan: LogicalPlan): LogicalPlan = Union(logicalPlan, otherPlan)

// TODO specify the output column names
def generate(
generator: Generator,
join: Boolean = false,
outer: Boolean = false,
alias: Option[String] = None): LogicalPlan =
Generate(generator, join = join, outer = outer, alias, Nil, logicalPlan)
// TODO specify the output column names
def generate(
generator: Generator,
join: Boolean = false,
outer: Boolean = false,
alias: Option[String] = None): LogicalPlan =
Generate(generator, join = join, outer = outer, alias, Nil, logicalPlan)

def insertInto(tableName: String, overwrite: Boolean = false): LogicalPlan =
InsertIntoTable(
analysis.UnresolvedRelation(Seq(tableName)), Map.empty, logicalPlan, overwrite, false)
def insertInto(tableName: String, overwrite: Boolean = false): LogicalPlan =
InsertIntoTable(
analysis.UnresolvedRelation(Seq(tableName)), Map.empty, logicalPlan, overwrite, false)

def analyze: LogicalPlan = EliminateSubQueries(analysis.SimpleAnalyzer.execute(logicalPlan))
}
def analyze: LogicalPlan = EliminateSubQueries(analysis.SimpleAnalyzer.execute(logicalPlan))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ case class CountDistinct(expressions: Seq[Expression]) extends PartialAggregate1
}

case class CountDistinctFunction(
@transient expr: Seq[Expression],
@transient base: AggregateExpression1)
@transient expr: Seq[Expression],
@transient base: AggregateExpression1)
extends AggregateFunction1 {

def this() = this(null, null) // Required for serialization.
Expand Down Expand Up @@ -233,8 +233,8 @@ case class CollectHashSet(expressions: Seq[Expression]) extends AggregateExpress
}

case class CollectHashSetFunction(
@transient expr: Seq[Expression],
@transient base: AggregateExpression1)
@transient expr: Seq[Expression],
@transient base: AggregateExpression1)
extends AggregateFunction1 {

def this() = this(null, null) // Required for serialization.
Expand Down

0 comments on commit e693c54

Please sign in to comment.