FailedChanges

Summary

  1. [SPARK-25727][SQL] Add outputOrdering to otherCopyArgs in (details)
Commit 6c3f2c6a6aa69f80de5504961cfd61b9a61ea7ce by dongjoon
[SPARK-25727][SQL] Add outputOrdering to otherCopyArgs in
InMemoryRelation
## What changes were proposed in this pull request? Add `outputOrdering
` to `otherCopyArgs` in InMemoryRelation so that this field will be
copied when we doing the tree transformation.
```
   val data = Seq(100).toDF("count").cache()
   data.queryExecution.optimizedPlan.toJSON
```
The above code can generate the following error:
``` assertion failed: InMemoryRelation fields: output, cacheBuilder,
statsOfPlanToCache, outputOrdering, values: List(count#178),
CachedRDDBuilder(true,10000,StorageLevel(disk, memory, deserialized, 1
replicas),*(1) Project [value#176 AS count#178]
+- LocalTableScan [value#176]
,None), Statistics(sizeInBytes=12.0 B, hints=none)
java.lang.AssertionError: assertion failed: InMemoryRelation fields:
output, cacheBuilder, statsOfPlanToCache, outputOrdering, values:
List(count#178), CachedRDDBuilder(true,10000,StorageLevel(disk, memory,
deserialized, 1 replicas),*(1) Project [value#176 AS count#178]
+- LocalTableScan [value#176]
,None), Statistics(sizeInBytes=12.0 B, hints=none)
at scala.Predef$.assert(Predef.scala:170)
at
org.apache.spark.sql.catalyst.trees.TreeNode.jsonFields(TreeNode.scala:611)
at
org.apache.spark.sql.catalyst.trees.TreeNode.org$apache$spark$sql$catalyst$trees$TreeNode$$collectJsonValue$1(TreeNode.scala:599)
at
org.apache.spark.sql.catalyst.trees.TreeNode.jsonValue(TreeNode.scala:604)
at
org.apache.spark.sql.catalyst.trees.TreeNode.toJSON(TreeNode.scala:590)
```
## How was this patch tested?
Added a test
Closes #22715 from gatorsmile/copyArgs1.
Authored-by: gatorsmile <gatorsmile@gmail.com> Signed-off-by: Dongjoon
Hyun <dongjoon@apache.org>
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala (diff)