Azure 获得;发射时出错;“方法太大”;在DataRicks中创建dataframe时

Azure 获得;发射时出错;“方法太大”;在DataRicks中创建dataframe时,azure,apache-spark,databricks,azure-databricks,Azure,Apache Spark,Databricks,Azure Databricks,我在函数中创建一个数据帧并返回该数据帧 def getDataFrame(rdd: RDD[MyCaseClass]) = { spark.createDataFrame(rdd) } 此函数所在的文件编译时没有任何错误。在另一个文件中运行此操作时会引发错误: %run "./Load_Dataframe" The execution of this command did not finish successfully import java.util.P

我在函数中创建一个数据帧并返回该数据帧

def getDataFrame(rdd: RDD[MyCaseClass]) = {
    spark.createDataFrame(rdd)
  }
此函数所在的文件编译时没有任何错误。在另一个文件中运行此操作时会引发错误:

%run "./Load_Dataframe"

The execution of this command did not finish successfully

import java.util.Properties
import org.apache.spark.rdd.RDD
defined class MyCaseClass
error: Error while emitting $$$cbf4485eb7852af86a790a85973a466$$$$w$STHierarchy$$typecreator1$1
Method too large: $$$cbf4485eb7852af86a790a85973a466$$$$w$STHierarchy$$typecreator1$1.apply (Lscala/reflect/api/Mirror;)Lscala/reflect/api/Types$TypeApi;

大多数在线解决方案都要求将函数划分为多个较小的函数。但是我的函数只有一行代码,我不知道如何将它划分为多个函数。

您在某个地方有非常复杂的转换,或者您的case类中有太多的字段,或者类似的内容。但如果不研究完整的代码,很难说