Skip to content

Commit 5936e09

Browse files
[SPARK-17101][SQL] Provide consistent format identifiers for TextFileFormat and ParquetFileFormat
1 parent cf0cce9 commit 5936e09

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ParquetFileFormat
6060

6161
override def shortName(): String = "parquet"
6262

63-
override def toString: String = "ParquetFormat"
63+
override def toString: String = shortName.toUpperCase
6464

6565
override def hashCode(): Int = getClass.hashCode()
6666

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/text/TextFileFormat.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class TextFileFormat extends TextBasedFileFormat with DataSourceRegister {
4040

4141
override def shortName(): String = "text"
4242

43+
override def toString: String = shortName.toUpperCase
44+
4345
private def verifySchema(schema: StructType): Unit = {
4446
if (schema.size != 1) {
4547
throw new AnalysisException(

0 commit comments

Comments
 (0)