dongjoon-hyun commented on a change in pull request #28425:
URL: https://github.com/apache/spark/pull/28425#discussion_r453203114
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileScan.scala
##########
@@ -94,22 +96,27 @@ trait FileScan extends Scan with Batch with
SupportsReportStatistics with Loggin
override def hashCode(): Int = getClass.hashCode()
override def description(): String = {
+ val maxMetadataValueLength = 100
+ val metadataStr = getMetaData().toSeq.sorted.map {
+ case (key, value) =>
+ val redactedValue =
+ Utils.redact(sparkSession.sessionState.conf.stringRedactionPattern,
value)
+ key + ": " + StringUtils.abbreviate(redactedValue,
maxMetadataValueLength)
+ }.mkString(", ")
+ s"${this.getClass.getSimpleName} $metadataStr"
+ }
+
+ override def getMetaData(): Map[String, String] = {
val maxMetadataValueLength = 100
val locationDesc =
fileIndex.getClass.getSimpleName +
Utils.buildLocationMetadata(fileIndex.rootPaths,
maxMetadataValueLength)
- val metadata: Map[String, String] = Map(
+ Map(
+ "Format" -> s"${this.getClass.getSimpleName.replace("Scan",
"").toLowerCase(Locale.ROOT)}",
Review comment:
Just a question. Is this a new metadata?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]