vicennial commented on code in PR #41971:
URL: https://github.com/apache/spark/pull/41971#discussion_r1261790780
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/AgnosticEncoder.scala:
##########
@@ -103,18 +102,18 @@ object AgnosticEncoders {
}
// Contains a sequence of fields. The fields can be flattened to columns in
a row.
Review Comment:
Nit: can also remove the word "flattened" in this comment here I think
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/AgnosticEncoder.scala:
##########
@@ -37,15 +37,14 @@ import org.apache.spark.util.Utils
* [[java.sql.Date]] and [[java.time.LocalDate]] are allowed. Deserialization
is never lenient; it
* will always produce instance of the external type.
*
- * An encoder is flattenable if it contains fields that can be fattened to a
row.
*/
trait AgnosticEncoder[T] extends Encoder[T] {
def isPrimitive: Boolean
def nullable: Boolean = !isPrimitive
def dataType: DataType
override def schema: StructType = StructType(StructField("value", dataType,
nullable) :: Nil)
def lenientSerialization: Boolean = false
- def isFlattenable: Boolean = false
+ def isStruct: Boolean = false // set to true if it is a struct encoder
Review Comment:
Nit: comment seems a bit redundant
--
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]