# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Index: core/src/main/scala/org/apache/spark/Dependency.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/main/scala/org/apache/spark/Dependency.scala b/core/src/main/scala/org/apache/spark/Dependency.scala
--- a/core/src/main/scala/org/apache/spark/Dependency.scala	(revision e8e53c5dda17d63698b1542c179415b8ef145856)
+++ b/core/src/main/scala/org/apache/spark/Dependency.scala	(revision 1abb59096135cdceedb0ab1591eaa267d93703f4)
@@ -78,6 +78,7 @@
     val keyOrdering: Option[Ordering[K]] = None,
     val aggregator: Option[Aggregator[K, V, C]] = None,
     val mapSideCombine: Boolean = false,
+    var schema: AnyRef = null,
     val shuffleWriterProcessor: ShuffleWriteProcessor = new ShuffleWriteProcessor)
   extends Dependency[Product2[K, V]] with Logging {
 
Index: sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala	(revision e8e53c5dda17d63698b1542c179415b8ef145856)
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala	(revision 1abb59096135cdceedb0ab1591eaa267d93703f4)
@@ -452,6 +452,7 @@
         rddWithPartitionIds,
         new PartitionIdPassthrough(part.numPartitions),
         serializer,
+        schema = StructType.fromAttributes(outputAttributes),
         shuffleWriterProcessor = createShuffleWriteProcessor(writeMetrics))
 
     dependency
