Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21732#discussion_r209130069
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala
---
@@ -43,20 +43,17 @@ import org.apache.spark.util.Utils
* to the name `value`.
*/
object ExpressionEncoder {
- def apply[T : TypeTag](): ExpressionEncoder[T] = {
+ // Constructs an encoder for top-level row.
+ def apply[T : TypeTag](): ExpressionEncoder[T] = apply(topLevel = true)
+
+ /**
+ * @param topLevel whether the encoders to construct are for top-level
row.
+ */
+ def apply[T : TypeTag](topLevel: Boolean): ExpressionEncoder[T] = {
--- End diff --
where do we call this apply with `topLevel = false`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]