Spark 之 printSchema

printSchema

spark/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala

 /**
   * Prints the schema to the console in a nice tree format.
   *
   * @group basic
   * @since 1.6.0
   */
  def printSchema(): Unit = printSchema(Int.MaxValue)

  // scalastyle:off println
  /**
   * Prints the schema up to the given level to the console in a nice tree format.
   *
   * @group basic
   * @since 3.0.0
   */
  def printSchema(level: Int): Unit = println(schema.treeString(level))
  // scalastyle:on println
treeString

spark/sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala

def treeString(maxDepth: Int): String = {
    val 

你可能感兴趣的:(spark,spark,scala,big,data)