Skip to content

Commit 520d823

Browse files
committed
Add Path.toHadoop method
1 parent ab13404 commit 520d823

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

modules/core/src/main/scala/me/mnedokushev/zio/apache/parquet/core/hadoop/ParquetWriter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ object ParquetWriter {
7373
for {
7474
schema <- schemaEncoder.encodeZIO(schema, tag.tag.shortName, optional = false)
7575
messageSchema <- castSchema(schema)
76-
hadoopFile <- ZIO.attemptBlockingIO(HadoopOutputFile.fromPath(path.underlying, hadoopConf))
76+
hadoopFile <- ZIO.attemptBlockingIO(HadoopOutputFile.fromPath(path.toHadoop, hadoopConf))
7777
builder = new Builder(hadoopFile, messageSchema)
7878
.withWriteMode(writeMode)
7979
.withCompressionCodec(compressionCodecName)

modules/core/src/main/scala/me/mnedokushev/zio/apache/parquet/core/hadoop/Path.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ case class Path(underlying: HadoopPath) {
1616
def toJava: JPath =
1717
Paths.get(underlying.toUri)
1818

19+
def toHadoop: HadoopPath =
20+
underlying
21+
1922
}
2023

2124
object Path {

0 commit comments

Comments
 (0)