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"
相关推荐
KaMeidebaby4 分钟前
卡梅德生物技术快报|适配体筛选技术架构演进:SPARK-seq 高通量平台原理与技术流程解析
大数据·前端·其他·百度·架构·spark·新浪微博
乐迪信息6 分钟前
乐迪信息:港口船舶盲区看不清?AI视觉检测精准识别
大数据·人工智能·安全·计算机视觉·目标跟踪·视觉检测
阿坤带你走近大数据7 分钟前
Kafka的基本概念,基本用法及常见使用场景
分布式·kafka
小黄人软件11 分钟前
AI时代什么是高价值目标?
大数据·人工智能
海兰12 分钟前
使用 ES|QL 调试 LLM 延迟、成本与 GPU 饱和度
大数据·elasticsearch·jenkins
财经资讯数据_灵砚智能13 分钟前
基于全球经济类多源新闻的NLP情感分析与数据可视化(夜间-次晨)2026年5月21日
大数据·人工智能·python·信息可视化·自然语言处理
Elastic 中国社区官方博客13 分钟前
用于调试 LLM 延迟、成本和 GPU 饱和度的 ES|QL 查询
大数据·人工智能·elasticsearch·搜索引擎·ai·云原生·serverless
逻极14 分钟前
RabbitMQ 从入门到精通:构建高可用、高性能的消息中间件系统
分布式·rabbitmq·消息中间件
Lyyaoo.14 分钟前
Kafka快速入门
分布式·kafka
weixin_4235339916 分钟前
windows11安装claude code模型用deepseek,跳过国内校验。
大数据·elasticsearch·搜索引擎