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"
相关推荐
Cachel wood19 分钟前
后端开发:计算机网络、数据库常识
android·大数据·数据库·数据仓库·sql·计算机网络·mysql
暗离子跃迁26 分钟前
达梦数据库单机部署dmhs同步复制(dm8->kafka)
linux·运维·数据库·分布式·学习·kafka·达梦数据库
得物技术1 小时前
得物社区活动:组件化的演进与实践
java·大数据·前端
Elastic 中国社区官方博客2 小时前
使用 Azure LLM Functions 与 Elasticsearch 构建更智能的查询体验
大数据·人工智能·elasticsearch·microsoft·搜索引擎·全文检索·azure
刘天远3 小时前
深度解析企业风控API技术实践:构建全方位企业风险画像系统
大数据·数据库·数据分析
后院那片海3 小时前
GFS分布式文件系统
大数据·服务器·数据库
IT_10244 小时前
Spring Boot的Security安全控制——应用SpringSecurity!
大数据·spring boot·后端
代码的知行者4 小时前
分布式数据库中间件-Sharding-JDBC
数据库·分布式·中间件
啾啾Fun4 小时前
Java面试题:分布式ID时钟回拨怎么处理?序列号耗尽了怎么办?
java·分布式·分布式id·八股
盟接之桥4 小时前
国产替代新标杆|盟接之桥EDI软件让中国制造连接世界更安全、更简单、更有底气
大数据