Skip to content

Commit c930fd9

Browse files
committed
Align to the current approach
1 parent 1e3e524 commit c930fd9

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ private[avro] case class AvroDataToCatalyst(
6161

6262
@transient private lazy val reader = new GenericDatumReader[Any](actualSchema, expectedSchema)
6363

64-
private val datetimeRebaseMode = avroOptions.datetimeRebaseModeInRead
65-
6664
@transient private lazy val deserializer =
67-
new AvroDeserializer(expectedSchema, dataType, datetimeRebaseMode)
65+
new AvroDeserializer(expectedSchema, dataType, avroOptions.datetimeRebaseModeInRead)
6866

6967
@transient private var decoder: BinaryDecoder = _
7068

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private[sql] class AvroOptions(
9797
/**
9898
* The rebasing mode for the DATE and TIMESTAMP_MICROS, TIMESTAMP_MILLIS values in reads.
9999
*/
100-
def datetimeRebaseModeInRead: String = parameters
100+
val datetimeRebaseModeInRead: String = parameters
101101
.get(AvroOptions.DATETIME_REBASE_MODE)
102102
.getOrElse(SQLConf.get.getConf(SQLConf.LEGACY_AVRO_REBASE_MODE_IN_READ))
103103
}

0 commit comments

Comments
 (0)