LuciferYang commented on a change in pull request #30924:
URL: https://github.com/apache/spark/pull/30924#discussion_r549223960
##########
File path:
core/src/main/scala/org/apache/spark/rdd/SequenceFileRDDFunctions.scala
##########
@@ -32,16 +32,13 @@ import org.apache.spark.internal.Logging
* @note This can't be part of PairRDDFunctions because we need more implicit
parameters to
* convert our keys and values to Writable.
*/
-class SequenceFileRDDFunctions[K <% Writable: ClassTag, V <% Writable :
ClassTag](
+class SequenceFileRDDFunctions[K: IsWritable: ClassTag, V: IsWritable:
ClassTag](
Review comment:
I tried three ways to fix issue:
The 1st way:
```
class SequenceFileRDDFunctions[K: ClassTag, V: ClassTag](
self: RDD[(K, V)],
_keyWritableClass: Class[_ <: Writable],
_valueWritableClass: Class[_ <: Writable])
(implicit kToWritable: K => Writable, vToWritable: V => Writable)
```
The 2nd way:
```
class SequenceFileRDDFunctions[K, V](
self: RDD[(K, V)],
_keyWritableClass: Class[_ <: Writable],
_valueWritableClass: Class[_ <: Writable])
(implicit ev$1: K => Writable, ev$2: V => Writable, ev$3: ClassTag[K],
ev$4: ClassTag[V])
```
The 2 above way will let `MIMIA tests` check failed , and the 3rd way is
refer to Scala user
[QA](https://users.scala-lang.org/t/scala-2-13-0-deprecates-but-how-do-i-get-rid-of-this-in-a-class-definition/4679),
def a new type `IsWritable` and use `K: IsWritable: ClassTag` instead of `K
<% Writable` and this way not break the `MIMIA tests`.
But I'm very sorry, I haven't figured out why the 3rd way didn't break the
`MIMA test` check
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]