Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove the duplicated test
  • Loading branch information
HyukjinKwon committed Mar 2, 2016
commit d107d50bd2bc659d3f5441f8e1741c8356b6cc6e
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)
}
}
}
}