Skip to content

Commit

Permalink
More style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jan 21, 2015
1 parent 526c3b0 commit b1a0f6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class DDLScanSource extends RelationProvider {
override def createRelation(
sqlContext: SQLContext,
parameters: Map[String, String]): BaseRelation = {
SimpleDDLScan(parameters("from").toInt, parameters("TO").toInt)(sqlContext)
}
SimpleDDLScan(parameters("from").toInt, parameters("TO").toInt)(sqlContext)
}
}

case class SimpleDDLScan(from: Int, to: Int)(@transient val sqlContext: SQLContext)
Expand All @@ -50,14 +50,15 @@ case class SimpleDDLScan(from: Int, to: Int)(@transient val sqlContext: SQLConte
StructField("arrayType", ArrayType(StringType)),
StructField("structType",
StructType(StructField("f1",StringType) ::
(StructField("f2",IntegerType)) :: Nil
StructField("f2",IntegerType) :: Nil
)
)
))


override def buildScan() = sqlContext.sparkContext.parallelize(from to to).
map(e => Row(s"people$e",e*2))
override def buildScan() = sqlContext.sparkContext.parallelize(from to to).map { e =>
Row(s"people$e", e * 2)
}
}

class DDLTestSuite extends DataSourceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
}
new SchemaRDD(this, basicPlan)
} else {
sys.error(s"Unsupported SQL dialect: ${conf.dialect}. Try 'sql' or 'hiveql'")
sys.error(s"Unsupported SQL dialect: ${conf.dialect}. Try 'sql' or 'hiveql'")
}
}

Expand Down

0 comments on commit b1a0f6a

Please sign in to comment.