Skip to content

Commit 06a80bb

Browse files
committed
remove implicit class AvroDataFrameWriter/AvroDataFrameReader
1 parent 8817c68 commit 06a80bb

2 files changed

Lines changed: 96 additions & 110 deletions

File tree

external/avro/src/main/scala/org/apache/spark/sql/avro/package.scala

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,9 @@
1717

1818
package org.apache.spark.sql
1919

20-
import org.apache.avro.Schema
21-
2220
import org.apache.spark.annotation.Experimental
2321

2422
package object avro {
25-
/**
26-
* Adds a method, `avro`, to DataFrameWriter that allows you to write avro files using
27-
* the DataFileWriter
28-
*/
29-
implicit class AvroDataFrameWriter[T](writer: DataFrameWriter[T]) {
30-
def avro: String => Unit = writer.format("avro").save
31-
}
32-
33-
/**
34-
* Adds a method, `avro`, to DataFrameReader that allows you to read avro files using
35-
* the DataFileReader
36-
*/
37-
implicit class AvroDataFrameReader(reader: DataFrameReader) {
38-
def avro: String => DataFrame = reader.format("avro").load
39-
40-
@scala.annotation.varargs
41-
def avro(sources: String*): DataFrame = reader.format("avro").load(sources: _*)
42-
}
43-
4423
/**
4524
* Converts a binary column of avro format into its corresponding catalyst value. The specified
4625
* schema must match the read data, otherwise the behavior is undefined: it may fail or return

0 commit comments

Comments
 (0)