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"
相关推荐
Bug退退退1239 分钟前
RabbitMQ 之消息积压
分布式·rabbitmq
熊猫钓鱼>_>10 分钟前
Hadoop 用户入门指南:驾驭大数据的力量
大数据·hadoop·分布式
Leo.yuan1 小时前
数据分析师如何构建自己的底层逻辑?
大数据·数据仓库·人工智能·数据挖掘·数据分析
Aurora_NeAr2 小时前
Apache Iceberg数据湖高级特性及性能调优
大数据·后端
SoFlu软件机器人2 小时前
飞算科技正在撬动各行业数字化转型的深层变革
大数据·科技
文艺倾年2 小时前
【八股消消乐】浅尝Kafka性能优化
分布式·性能优化·kafka
钟琛......3 小时前
Redisson 的分布式锁
分布式
抛砖者4 小时前
hive/spark sql中unix_timestamp 函数的坑以及时间戳相关的转换
hive·sql·spark
samLi06205 小时前
【工具变量】全国省市区县土地出让结果公告数据(2000-2024年)
大数据
CodeWithMe6 小时前
【Note】《Kafka: The Definitive Guide》第11章:Stream Processing
分布式·kafka