File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -197,16 +197,12 @@ private[parquet] class CatalystWriteSupport extends WriteSupport[InternalRow] wi
197197 val numBytes = minBytesForPrecision(precision)
198198
199199 val int32Writer =
200- (row : SpecializedGetters , ordinal : Int ) => {
201- val unscaledInt = row.getDecimal(ordinal, precision, scale).toUnscaledLong.toInt
202- recordConsumer.addInteger(unscaledInt)
203- }
200+ (row : SpecializedGetters , ordinal : Int ) =>
201+ recordConsumer.addInteger(row.getLong(ordinal).toInt)
204202
205203 val int64Writer =
206- (row : SpecializedGetters , ordinal : Int ) => {
207- val unscaledLong = row.getDecimal(ordinal, precision, scale).toUnscaledLong
208- recordConsumer.addLong(unscaledLong)
209- }
204+ (row : SpecializedGetters , ordinal : Int ) =>
205+ recordConsumer.addLong(row.getLong(ordinal))
210206
211207 val binaryWriterUsingUnscaledLong =
212208 (row : SpecializedGetters , ordinal : Int ) => {
You can’t perform that action at this time.
0 commit comments