Skip to content

Commit

Permalink
Remove the duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Mar 2, 2016
1 parent a96e510 commit d107d50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -744,26 +744,6 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSQLContext {
}
}
}

test("SPARK-13543: Support for specifying compression codec for Parquet via option()") {
withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> "UNCOMPRESSED") {
withTempPath { dir =>
val path = s"${dir.getCanonicalPath}/table1"
val df = (1 to 5).map(i => (i, (i % 2).toString)).toDF("a", "b")
df.write
.option("compression", "GzIP")
.parquet(path)

val compressedFiles = new File(path).listFiles()
assert(compressedFiles.exists(_.getName.endsWith(".gz.parquet")))

val copyDf = sqlContext
.read
.parquet(path)
checkAnswer(df, copyDf)
}
}
}
}

class JobCommitFailureParquetOutputCommitter(outputPath: Path, context: TaskAttemptContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,23 @@ class ParquetHadoopFsRelationSuite extends HadoopFsRelationTest {
}
}

test("SPARK-13543: Support for specifying compression codec for ORC via option()") {
withTempPath { dir =>
val path = s"${dir.getCanonicalPath}/table1"
val df = (1 to 5).map(i => (i, (i % 2).toString)).toDF("a", "b")
df.write
.option("compression", "sNaPpy")
.parquet(path)

val compressedFiles = new File(path).listFiles()
assert(compressedFiles.exists(_.getName.endsWith(".snappy")))

val copyDf = sqlContext
.read
.parquet(path)

checkAnswer(df, copyDf)
test("SPARK-13543: Support for specifying compression codec for Parquet via option()") {
withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> "UNCOMPRESSED") {
withTempPath { dir =>
val path = s"${dir.getCanonicalPath}/table1"
val df = (1 to 5).map(i => (i, (i % 2).toString)).toDF("a", "b")
df.write
.option("compression", "GzIP")
.parquet(path)

val compressedFiles = new File(path).listFiles()
assert(compressedFiles.exists(_.getName.endsWith(".gz.parquet")))

val copyDf = sqlContext
.read
.parquet(path)
checkAnswer(df, copyDf)
}
}
}
}

0 comments on commit d107d50

Please sign in to comment.