Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21564#discussion_r195349283
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala
---
@@ -170,6 +170,8 @@ case class InMemoryTableScanExec(
override def outputPartitioning: Partitioning = {
relation.cachedPlan.outputPartitioning match {
case h: HashPartitioning =>
updateAttribute(h).asInstanceOf[HashPartitioning]
+ case r: RangePartitioning =>
+ r.copy(ordering =
r.ordering.map(updateAttribute(_).asInstanceOf[SortOrder]))
--- End diff --
why not just `updateAttribute(r)`?
Moreover, in order to avoid the same issue in the future with other cases,
have you considered doing something like:
```
updateAttribute(relation.cachedPlan.outputPartitioning)
``
?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]