Spark 之 SparkPlanInfo

src/main/scala/org/apache/spark/sql/execution/SparkPlanInfo.scala

c 复制代码
    new SparkPlanInfo(
      plan.nodeName,
      plan.simpleString(SQLConf.get.maxToStringFields),
      children.map(fromSparkPlan),
      metadata,
      metrics)

src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala

c 复制代码
  override def simpleString(maxFields: Int): String = statePrefix + super.simpleString(maxFields)

src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala

c 复制代码
  /**
   * ONE line description of this node.
   * @param maxFields Maximum number of fields that will be converted to strings.
   *                  Any elements beyond the limit will be dropped.
   */
  def simpleString(maxFields: Int): String = s"$nodeName ${argString(maxFields)}".trim
c 复制代码
  /** Returns a string representing the arguments to this node, minus any children */
  def argString(maxFields: Int): String = stringArgs.flatMap {
    case tn: TreeNode[_] if allChildren.contains(tn) => Nil
    case Some(tn: TreeNode[_]) if allChildren.contains(tn) => Nil
    case Some(tn: TreeNode[_]) => tn.simpleString(maxFields) :: Nil
    case tn: TreeNode[_] => tn.simpleString(maxFields) :: Nil
    case seq: Seq[Any] if seq.toSet.subsetOf(allChildren.asInstanceOf[Set[Any]]) => Nil
    case iter: Iterable[_] if iter.isEmpty => Nil
    case array: Array[_] if array.isEmpty => Nil
    case xs @ (_: Seq[_] | _: Set[_] | _: Array[_]) =>
      formatArg(xs, maxFields) :: Nil
    case null => Nil
    case None => Nil
    case Some(null) => Nil
    case Some(table: CatalogTable) =>
      stringArgsForCatalogTable(table)
    case Some(any) => any :: Nil
    case map: CaseInsensitiveStringMap =>
      redactMapString(map.asCaseSensitiveMap().asScala, maxFields)
    case map: Map[_, _] =>
      redactMapString(map, maxFields)
    case t: TableSpec =>
      t.copy(properties = Utils.redact(t.properties).toMap,
        options = Utils.redact(t.options).toMap) :: Nil
    case table: CatalogTable =>
      stringArgsForCatalogTable(table)

    case other => other :: Nil
  }.mkString(", ")

src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala

c 复制代码
override def toString: String = s"$child AS $name#${exprId.id}$typeSuffix$delaySuffix"
相关推荐
SmartBrain40 分钟前
编程助手工具自动化开发对比报告:OpenSpec、Claude Code、Cursor、PI
大数据·人工智能
小赖同学啊40 分钟前
可信数据空间设计
大数据
想ai抽41 分钟前
Spark Executor 因节点内存超限被杀的分析与应对
大数据·性能优化·spark
就改了2 小时前
Windows Elasticsearch 完整上手教程
大数据·windows·elasticsearch
yyuuuzz2 小时前
独立站运营的几个技术层面常见问题
大数据·运维·服务器·网络·数据库·aws
XIAOYU6720132 小时前
高中物理成绩优异,适合报考大数据哪个细分专业数学成绩偏弱,还适合填报大数据相关专业吗
大数据
2601_954971132 小时前
大数据需要掌握哪些主流大数据工具框架
大数据
Urbano3 小时前
工装标准缝纫流程及自动化升级提质增产方案
大数据·人工智能·算法
wanghowie3 小时前
35. 从AI客服到AI运营助手:Workflow、Single Agent、Multi-Agent、Agent Native 的架构选型实践
大数据·人工智能·架构
湘美书院--湘美谈教育3 小时前
湘美谈教育湘美书院考古教育系列:湖湘一万年序列整理研究
大数据·人工智能·深度学习·神经网络·机器学习