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"
相关推荐
TDengine (老段)9 分钟前
TDengine IDMP 事件 —— 事件模板
大数据·数据库·人工智能·时序数据库·tdengine·涛思数据
蓝天守卫者联盟122 分钟前
多段式TO炉厂家深度解析:技术选型与行业应用洞察
大数据
斯特凡今天也很帅23 分钟前
Elasticsearch数据库专栏(二)DSL语句总结(更新中)
大数据·elasticsearch·搜索引擎
杰建云16727 分钟前
多门店小程序和连锁管理系统的区别?
大数据·小程序制作
mhkxbq30 分钟前
昆仑G5580、G5680 V2、G2280及泰山鲲鹏200,AI大数据优选服务器
大数据·服务器·人工智能
Henb9291 小时前
# Spark 内核级调优源码分析
大数据·ajax·spark
q_35488851531 小时前
计算机毕业设计:Python智慧水文监测与流量预测系统 Flask框架 多元线性回归 数据分析 可视化 水网 流量预测 水位预测(建议收藏)✅
大数据·python·信息可视化·数据挖掘·flask·线性回归·课程设计
二十七剑1 小时前
Elasticsearch的索引问题
大数据·elasticsearch·搜索引擎
枫叶林FYL1 小时前
【自然语言处理 NLP】8.2 Ring Attention 与分布式长上下文训练
人工智能·分布式·自然语言处理
思维新观察1 小时前
流量红利消退,可酷AI无人直播破局,引领行业进入效率竞争新时代
大数据·人工智能