Skip to content

Commit

Permalink
Update AbstractAvroParquetBase.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Oct 7, 2023
1 parent 33b6e24 commit 841d687
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.apache.parquet.hadoop.util.HadoopInputFile
import org.apache.parquet.hadoop.{ ParquetReader, ParquetWriter }
import org.scalacheck.Gen

import scala.annotation.nowarn
import scala.util.Random

trait AbstractAvroParquetBase {
Expand All @@ -47,7 +48,7 @@ trait AbstractAvroParquetBase {
val conf: Configuration = new Configuration()
conf.setBoolean(AvroReadSupport.AVRO_COMPATIBILITY, true)

@SuppressWarnings(Array("deprecation"))
@nowarn("msg=deprecated")
def parquetWriter[T <: GenericRecord](file: String, conf: Configuration, schema: Schema): ParquetWriter[T] =
AvroParquetWriter.builder[T](new Path(file)).withConf(conf).withSchema(schema).build()

Expand Down Expand Up @@ -81,7 +82,7 @@ trait AbstractAvroParquetBase {
// #prepare-source
}

@SuppressWarnings(Array("deprecation"))
@nowarn("msg=deprecated")
def sinkDocumentation(): Unit = {
// #prepare-sink
import com.sksamuel.avro4s.Record
Expand All @@ -99,7 +100,7 @@ trait AbstractAvroParquetBase {
}
}

@SuppressWarnings(Array("deprecation"))
@nowarn("msg=deprecated")
def initWriterDocumentation(): Unit = {
// #init-writer
import org.apache.avro.generic.GenericRecord
Expand Down

0 comments on commit 841d687

Please sign in to comment.