This is an automated email from the ASF dual-hosted git repository. wenchen 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 6e537f30ac2 [SPARK-41639][SQL][PROTOBUF] Remove ScalaReflectionLock from SchemaConverters 6e537f30ac2 is described below commit 6e537f30ac2b19617c6cc11dd4f7f92946988f7b Author: SandishKumarHN <sanysand...@gmail.com> AuthorDate: Thu Dec 22 11:36:30 2022 +0800 [SPARK-41639][SQL][PROTOBUF] Remove ScalaReflectionLock from SchemaConverters ### What changes were proposed in this pull request? Following up from PR https://github.com/apache/spark/pull/38922 to remove unnecessary ScalaReflectionLock from SchemaConvertors file. cc: cloud-fan ### Why are the changes needed? removing unnecessary code ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? existing unit tests Closes #39147 from SandishKumarHN/SPARK-41639. Authored-by: SandishKumarHN <sanysand...@gmail.com> Signed-off-by: Wenchen Fan <wenc...@databricks.com> --- .../scala/org/apache/spark/sql/protobuf/utils/SchemaConverters.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/SchemaConverters.scala b/connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/SchemaConverters.scala index 8d321c13a56..bb4aa492f5c 100644 --- a/connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/SchemaConverters.scala +++ b/connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/SchemaConverters.scala @@ -22,7 +22,6 @@ import com.google.protobuf.Descriptors.{Descriptor, FieldDescriptor} import org.apache.spark.annotation.DeveloperApi import org.apache.spark.sql.errors.QueryCompilationErrors -import org.apache.spark.sql.protobuf.ScalaReflectionLock import org.apache.spark.sql.types._ @DeveloperApi @@ -48,7 +47,7 @@ object SchemaConverters { def toSqlTypeHelper( descriptor: Descriptor, - protobufOptions: ProtobufOptions): SchemaType = ScalaReflectionLock.synchronized { + protobufOptions: ProtobufOptions): SchemaType = { SchemaType( StructType(descriptor.getFields.asScala.flatMap( structFieldFor(_, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org