Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/23062#discussion_r234834550 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/ScalaReflectionSuite.scala --- @@ -109,6 +109,64 @@ object TestingUDT { } } +/** An example derived from Twitter/Scrooge codegen for thrift */ +object ScroogeLikeExample { + def apply( + x: Int + ): ScroogeLikeExample = + new Immutable( + x + ) + + def unapply(_item: ScroogeLikeExample): _root_.scala.Option[Int] = _root_.scala.Some(_item.x) + + class Immutable(val x: Int) extends ScroogeLikeExample + + trait Proxy extends ScroogeLikeExample { + protected def _underlying_ScroogeLikeExample: ScroogeLikeExample + override def x: Int = _underlying_ScroogeLikeExample.x + } +} + +trait ScroogeLikeExample + extends _root_.scala.Product1[Int] --- End diff -- Does it really need to extend Product1 for the test? quite possibly, just didn't see it.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org