Github user michalsenkyr commented on a diff in the pull request:
https://github.com/apache/spark/pull/16240#discussion_r93805236
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLImplicits.scala
---
@@ -100,31 +97,36 @@ abstract class SQLImplicits {
// Seqs
/** @since 1.6.1 */
- implicit def newIntSeqEncoder: Encoder[Seq[Int]] = ExpressionEncoder()
+ implicit def newIntSeqEncoder[T <: Seq[Int] : TypeTag]: Encoder[T] =
ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newLongSeqEncoder: Encoder[Seq[Long]] = ExpressionEncoder()
+ implicit def newLongSeqEncoder[T <: Seq[Long] : TypeTag]: Encoder[T] =
ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newDoubleSeqEncoder: Encoder[Seq[Double]] =
ExpressionEncoder()
+ implicit def newDoubleSeqEncoder[T <: Seq[Double] : TypeTag]: Encoder[T]
= ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newFloatSeqEncoder: Encoder[Seq[Float]] =
ExpressionEncoder()
+ implicit def newFloatSeqEncoder[T <: Seq[Float] : TypeTag]: Encoder[T] =
ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newByteSeqEncoder: Encoder[Seq[Byte]] = ExpressionEncoder()
+ implicit def newByteSeqEncoder[T <: Seq[Byte] : TypeTag]: Encoder[T] =
ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newShortSeqEncoder: Encoder[Seq[Short]] =
ExpressionEncoder()
+ implicit def newShortSeqEncoder[T <: Seq[Short] : TypeTag]: Encoder[T] =
ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newBooleanSeqEncoder: Encoder[Seq[Boolean]] =
ExpressionEncoder()
+ implicit def newBooleanSeqEncoder[T <: Seq[Boolean] : TypeTag]:
Encoder[T] = ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newStringSeqEncoder: Encoder[Seq[String]] =
ExpressionEncoder()
+ implicit def newStringSeqEncoder[T <: Seq[String] : TypeTag]: Encoder[T]
= ExpressionEncoder()
/** @since 1.6.1 */
- implicit def newProductSeqEncoder[A <: Product : TypeTag]:
Encoder[Seq[A]] = ExpressionEncoder()
+ implicit def newProductSeqEncoder[A <: Product : TypeTag, T <: Seq[A] :
TypeTag]: Encoder[T] =
--- End diff --
This one is the same as all the other ones, just with Product subclasses.
If you were concerned about the `TypeTag` on `A`, it was actually not needed as
`T`'s tag already contains all the information. I just tested it to be sure and
removed it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]