LuciferYang commented on code in PR #38610:
URL: https://github.com/apache/spark/pull/38610#discussion_r1019789820
##########
sql/catalyst/src/main/scala-2.12/org/apache/spark/sql/catalyst/expressions/AttributeMap.scala:
##########
@@ -31,6 +31,10 @@ object AttributeMap {
new AttributeMap(kvs.map(kv => (kv._1.exprId, kv)).toMap)
}
+ def apply[A](kvs: Iterable[(Attribute, A)]): AttributeMap[A] = {
+ new AttributeMap(kvs.map(kv => (kv._1.exprId, kv)).toMap)
+ }
+
Review Comment:
```
https://github.com/apache/spark/blob/0cb79a4af27eb226a4f7574aa1c8b54412222583/sql/catalyst/src/main/scala-2.12/org/apache/spark/sql/catalyst/expressions/AttributeMap.scala#L26-L32
```
Can we identify the above two as `@ deprecated` now and remove it at an
appropriate time(maybe Spark 4.0?)? The new `apply` method is more general.
##########
sql/catalyst/src/main/scala-2.12/org/apache/spark/sql/catalyst/expressions/AttributeMap.scala:
##########
@@ -31,6 +31,10 @@ object AttributeMap {
new AttributeMap(kvs.map(kv => (kv._1.exprId, kv)).toMap)
}
+ def apply[A](kvs: Iterable[(Attribute, A)]): AttributeMap[A] = {
+ new AttributeMap(kvs.map(kv => (kv._1.exprId, kv)).toMap)
+ }
+
Review Comment:
https://github.com/apache/spark/blob/0cb79a4af27eb226a4f7574aa1c8b54412222583/sql/catalyst/src/main/scala-2.12/org/apache/spark/sql/catalyst/expressions/AttributeMap.scala#L26-L32
Can we identify the above two as `@ deprecated` now and remove it at an
appropriate time(maybe Spark 4.0?)? The new `apply` method is more general.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]