Skip to content

Commit

Permalink
more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Sep 13, 2014
1 parent 0bdbf21 commit 2dabae3
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,6 @@ class ParquetQuerySuite extends QueryTest with FunSuiteLike with BeforeAndAfterA
TestSQLContext.isParquetBinaryAsString)
}
val schemaRDD = new SchemaRDD(TestSQLContext, parquetRelation)
val resultWithString = schemaRDD.collect
range.foreach {
i =>
assert(resultWithString(i).getInt(0) === i)
assert(resultWithString(i)(1) === s"val_$i")
}

schemaRDD.registerTempTable("tmp")
checkAnswer(
Expand Down Expand Up @@ -433,15 +427,11 @@ class ParquetQuerySuite extends QueryTest with FunSuiteLike with BeforeAndAfterA
}

test("Insert (appending) to same table via Scala API") {
// TODO: why does collecting break things? It seems InsertIntoParquet::execute() is
// executed twice otherwise?!
sql("INSERT INTO testsource SELECT * FROM testsource")
val double_rdd = sql("SELECT * FROM testsource").collect()
assert(double_rdd != null)
assert(double_rdd.size === 30)
for(i <- (0 to 14)) {
assert(double_rdd(i) === double_rdd(i+15), s"error: lines $i and ${i+15} to not match")
}

// let's restore the original test data
Utils.deleteRecursively(ParquetTestData.testDir)
ParquetTestData.writeFile()
Expand Down

0 comments on commit 2dabae3

Please sign in to comment.