Github user jinxing64 commented on a diff in the pull request:
https://github.com/apache/spark/pull/22712#discussion_r224961789
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/types/MapType.scala ---
@@ -73,6 +74,90 @@ case class MapType(
override private[spark] def existsRecursively(f: (DataType) => Boolean):
Boolean = {
f(this) || keyType.existsRecursively(f) ||
valueType.existsRecursively(f)
}
+
+ private[this] class OrderedWrapper {
+ var isOrdered: Boolean = false
--- End diff --
Thanks for quick reply :)
Actually I'm not pretty sure about this.
If we do it like below
```
case class MapType(
keyType: DataType,
valueType: DataType,
valueContainsNull: Boolean,
ordered: Boolean)
```
The `ordered` will be spread to lots places in the code (especially in the
`...match ... case ...` ) and users can will also see it. But I think
`ordered` is a pretty internal parameter/characteristic and only used when
sorting map. So I try to make it private and lazy created.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]