Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/9649#discussion_r45026442
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala ---
@@ -328,7 +328,8 @@ object StructType extends AbstractDataType {
def apply(fields: Seq[StructField]): StructType =
StructType(fields.toArray)
def apply(fields: java.util.List[StructField]): StructType = {
- StructType(fields.toArray.asInstanceOf[Array[StructField]])
+ import scala.collection.JavaConverters._
+ StructType(fields.asScala)
--- End diff --
Without this change, was there any issue when we use
`org.apache.spark.sql.types.DataTypes.createStructType`? Or, the problem only
appear when we use this apply method directly?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]