Skip to content

Commit 94eea3a

Browse files
Scalastyle
1 parent 403061f commit 94eea3a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTableSupport.scala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ private[parquet] class RowReadSupport extends ReadSupport[Row] with Logging {
6565

6666
if (readContext.getReadSupportMetadata != null) {
6767
// first try to find the read schema inside the metadata (can result from projections)
68-
if (readContext.getReadSupportMetadata.get(RowReadSupport.SPARK_ROW_REQUESTED_SCHEMA) != null) {
68+
if (
69+
readContext
70+
.getReadSupportMetadata
71+
.get(RowReadSupport.SPARK_ROW_REQUESTED_SCHEMA) != null) {
6972
schema = ParquetTypesConverter.convertFromString(
7073
readContext.getReadSupportMetadata.get(RowReadSupport.SPARK_ROW_REQUESTED_SCHEMA))
7174
} else {
72-
// if unavailable, try the schema that was read originally from the file or provided during the
73-
// creation of the Parquet relation
75+
// if unavailable, try the schema that was read originally from the file or provided
76+
// during the creation of the Parquet relation
7477
if (readContext.getReadSupportMetadata.get(RowReadSupport.SPARK_METADATA_KEY) != null) {
7578
schema = ParquetTypesConverter.convertFromString(
7679
readContext.getReadSupportMetadata.get(RowReadSupport.SPARK_METADATA_KEY))
@@ -96,7 +99,9 @@ private[parquet] class RowReadSupport extends ReadSupport[Row] with Logging {
9699

97100
if (requestedAttributes != null) {
98101
parquetSchema = ParquetTypesConverter.convertFromAttributes(requestedAttributes)
99-
metadata.put(RowReadSupport.SPARK_ROW_REQUESTED_SCHEMA, ParquetTypesConverter.convertToString(requestedAttributes))
102+
metadata.put(
103+
RowReadSupport.SPARK_ROW_REQUESTED_SCHEMA,
104+
ParquetTypesConverter.convertToString(requestedAttributes))
100105
}
101106

102107
val origAttributesStr: String = configuration.get(RowWriteSupport.SPARK_ROW_SCHEMA)

0 commit comments

Comments
 (0)