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"
相关推荐
字节跳动数据平台15 分钟前
6000字技术向拆解 “大晓机器人”携手火山引擎多模态数据湖探索视频处理新路径
大数据
金融小师妹18 分钟前
AI算法视角下非农夜冲击波来袭,黄金高位区间震荡态势的深度神经网络解析
大数据·深度学习·1024程序员节
Hello.Reader19 分钟前
Flink SQL EXPLAIN “看懂计划”到“用 PLAN_ADVICE 调优”
大数据·sql·flink
+电报dapp12941 分钟前
波场链DAPP智能合约系统开发:解锁Web3.0时代的价值新范式
大数据·人工智能·web3·去中心化·区块链·智能合约·信任链
股票程序化交易接口41 分钟前
详细介绍程序化交易接口种类及特点,助你全面了解交易接口选择
大数据·股票api接口·股票量化接口·程序化交易接口·交易指令接口·行情数据接口·账户管理接口
陈喜标bill1 小时前
S2B2C私域会员电商如何重构企业经营逻辑
大数据·人工智能·重构
元气满满-樱1 小时前
分布式LNMP部署
分布式
AEMC马广川1 小时前
能源托管项目中“企业认证+人才证书”双轨评分策略分析
大数据·运维·人工智能·能源
一个很帅的帅哥1 小时前
git命令大全
大数据·git·elasticsearch
geneculture2 小时前
融智学体系图谱(精确对应版)
大数据·人工智能·学习·融智学的重要应用·信智序位