@@ -205,17 +205,10 @@ private[sql] object ParquetTestData {
205205 lazy val testNestedData1 = new ParquetRelation (testNestedDir1.toURI.toString)
206206 lazy val testNestedData2 = new ParquetRelation (testNestedDir2.toURI.toString)
207207
208- // Implicit
209- // TODO: get rid of this since it is confusing!
210- implicit def makePath (dir : File ): Path = {
211- new Path (new Path (dir.toURI), new Path (" part-r-0.parquet" ))
212- }
213-
214208 def writeFile () = {
215209 testDir.delete()
216210 val path : Path = new Path (new Path (testDir.toURI), new Path (" part-r-0.parquet" ))
217211 val job = new Job ()
218- val configuration : Configuration = ContextUtil .getConfiguration(job)
219212 val schema : MessageType = MessageTypeParser .parseMessageType(testSchema)
220213 val writeSupport = new TestGroupWriteSupport (schema)
221214 val writer = new ParquetWriter [Group ](path, writeSupport)
@@ -267,7 +260,7 @@ private[sql] object ParquetTestData {
267260 def writeNestedFile1 () {
268261 // example data from https://blog.twitter.com/2013/dremel-made-simple-with-parquet
269262 testNestedDir1.delete()
270- val path : Path = testNestedDir1
263+ val path : Path = new Path ( new Path ( testNestedDir1.toURI), new Path ( " part-r-0.parquet " ))
271264 val schema : MessageType = MessageTypeParser .parseMessageType(testNestedSchema1)
272265
273266 val r1 = new SimpleGroup (schema)
@@ -295,7 +288,7 @@ private[sql] object ParquetTestData {
295288
296289 def writeNestedFile2 () {
297290 testNestedDir2.delete()
298- val path : Path = testNestedDir2
291+ val path : Path = new Path ( new Path ( testNestedDir2.toURI), new Path ( " part-r-0.parquet " ))
299292 val schema : MessageType = MessageTypeParser .parseMessageType(testNestedSchema2)
300293
301294 val r1 = new SimpleGroup (schema)
@@ -332,7 +325,7 @@ private[sql] object ParquetTestData {
332325
333326 def writeNestedFile3 () {
334327 testNestedDir3.delete()
335- val path : Path = testNestedDir3
328+ val path : Path = new Path ( new Path ( testNestedDir3.toURI), new Path ( " part-r-0.parquet " ))
336329 val schema : MessageType = MessageTypeParser .parseMessageType(testNestedSchema3)
337330
338331 val r1 = new SimpleGroup (schema)
@@ -362,7 +355,7 @@ private[sql] object ParquetTestData {
362355
363356 def writeNestedFile4 () {
364357 testNestedDir4.delete()
365- val path : Path = testNestedDir4
358+ val path : Path = new Path ( new Path ( testNestedDir4.toURI), new Path ( " part-r-0.parquet " ))
366359 val schema : MessageType = MessageTypeParser .parseMessageType(testNestedSchema4)
367360
368361 val r1 = new SimpleGroup (schema)
@@ -393,8 +386,10 @@ private[sql] object ParquetTestData {
393386 writer.close()
394387 }
395388
396- def readNestedFile (path : File , schemaString : String ): Unit = {
389+ /* // TODO: this is not actually used anywhere but useful for debugging
390+ def readNestedFile(file: File, schemaString: String): Unit = {
397391 val configuration = new Configuration()
392+ val path = new Path(new Path(file.toURI), new Path("part-r-0.parquet"))
398393 val fs: FileSystem = path.getFileSystem(configuration)
399394 val schema: MessageType = MessageTypeParser.parseMessageType(schemaString)
400395 assert(schema != null)
@@ -404,6 +399,6 @@ private[sql] object ParquetTestData {
404399 val reader = new ParquetReader(new Path(path.toString), new GroupReadSupport())
405400 val first = reader.read()
406401 assert(first != null)
407- }
402+ }*/
408403}
409404
0 commit comments