huaxingao commented on a change in pull request #35204:
URL: https://github.com/apache/spark/pull/35204#discussion_r784522687
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowCreateTableExec.scala
##########
@@ -71,19 +75,39 @@ case class ShowCreateTableExec(
builder: StringBuilder,
tableOptions: Map[String, String]): Unit = {
if (tableOptions.nonEmpty) {
- val props = tableOptions.toSeq.sortBy(_._1).map { case (key, value) =>
- s"'${escapeSingleQuotedString(key)}' =
'${escapeSingleQuotedString(value)}'"
+ val props =
SQLConf.get.redactOptions(tableOptions).toSeq.sortBy(_._1).map {
+ case (key, value) =>
+ s"'${escapeSingleQuotedString(key)}' =
'${escapeSingleQuotedString(value)}'"
}
builder ++= "OPTIONS "
builder ++= concatByMultiLines(props)
}
}
private def showTablePartitioning(table: Table, builder: StringBuilder):
Unit = {
- if (!table.partitioning.isEmpty) {
- val transforms = new ArrayBuffer[String]
- table.partitioning.foreach(t => transforms += t.describe())
- builder ++= s"PARTITIONED BY ${transforms.mkString("(", ", ", ")")}\n"
+ table match {
+ case V1Table(t) =>
Review comment:
Haven't changed this yet. Remember that
`c.partitioning ++ c.tableSpec.bucketSpec.map(_.asTransform)` didn't work
inside `AstBuilder` because sortColumnNames needed to be empty. Now it should
work. I can have a follow up to fix this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]