Skip to content

Commit decf0c5

Browse files
committed
Class already exists.
1 parent 3e7737a commit decf0c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ class SQLContext(@transient val sparkContext: SparkContext)
541541
def createDataFrame(data: java.util.List[_], beanClass: Class[_]): DataFrame = {
542542
val schema = getSchema(beanClass)
543543
val className = beanClass.getName
544-
val localBeanInfo = Introspector.getBeanInfo(Utils.classForName(className))
544+
val beanInfo = Introspector.getBeanInfo(beanClass)
545545
val extractors =
546-
localBeanInfo.getPropertyDescriptors.filterNot(_.getName == "class").map(_.getReadMethod)
546+
beanInfo.getPropertyDescriptors.filterNot(_.getName == "class").map(_.getReadMethod)
547547
val methodsToConverts = extractors.zip(schema).map { case (e, attr) =>
548548
(e, CatalystTypeConverters.createToCatalystConverter(attr.dataType))
549549
}

0 commit comments

Comments
 (0)