This is an automated email from the ASF dual-hosted git repository. maxgekk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 59c55dd [SPARK-24774][SQL][FOLLOWUP] Remove unused code in SchemaConverters.scala 59c55dd is described below commit 59c55dd4c6f7772ef7949653679a2b76211788e8 Author: Gengliang Wang <gengli...@apache.org> AuthorDate: Wed Nov 3 08:43:25 2021 +0300 [SPARK-24774][SQL][FOLLOWUP] Remove unused code in SchemaConverters.scala ### What changes were proposed in this pull request? As MaxGekk pointed out in https://github.com/apache/spark/pull/22037/files#r741373793, there is some unused code in SchemaConverters.scala. The UUID generator was for generating `fix` avro field names but we figure out a better solution during PR review. This PR is to remove the dead code. ### Why are the changes needed? Code clean up ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing UT. Closes #34472 from gengliangwang/SPARK-24774-followup. Authored-by: Gengliang Wang <gengli...@apache.org> Signed-off-by: Max Gekk <max.g...@gmail.com> --- .../src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala | 4 ---- 1 file changed, 4 deletions(-) diff --git a/external/avro/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala b/external/avro/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala index 1c9b06b..347364c 100644 --- a/external/avro/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala +++ b/external/avro/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala @@ -18,14 +18,12 @@ package org.apache.spark.sql.avro import scala.collection.JavaConverters._ -import scala.util.Random import org.apache.avro.{LogicalTypes, Schema, SchemaBuilder} import org.apache.avro.LogicalTypes.{Date, Decimal, LocalTimestampMicros, LocalTimestampMillis, TimestampMicros, TimestampMillis} import org.apache.avro.Schema.Type._ import org.apache.spark.annotation.DeveloperApi -import org.apache.spark.sql.catalyst.util.RandomUUIDGenerator import org.apache.spark.sql.types._ import org.apache.spark.sql.types.Decimal.minBytesForPrecision @@ -35,8 +33,6 @@ import org.apache.spark.sql.types.Decimal.minBytesForPrecision */ @DeveloperApi object SchemaConverters { - private lazy val uuidGenerator = RandomUUIDGenerator(new Random().nextLong()) - private lazy val nullSchema = Schema.create(Schema.Type.NULL) /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org