cloud-fan commented on a change in pull request #35756:
URL: https://github.com/apache/spark/pull/35756#discussion_r822349667
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala
##########
@@ -66,23 +66,27 @@ import org.apache.spark.sql.types._
* }}}
*/
object RowEncoder {
- def apply(schema: StructType): ExpressionEncoder[Row] = {
+ def apply(schema: StructType, lenient: Boolean): ExpressionEncoder[Row] = {
val cls = classOf[Row]
val inputObject = BoundReference(0, ObjectType(cls), nullable = true)
- val serializer = serializerFor(inputObject, schema)
+ val serializer = serializerFor(inputObject, schema, lenient)
val deserializer = deserializerFor(GetColumnByOrdinal(0,
serializer.dataType), schema)
new ExpressionEncoder[Row](
serializer,
deserializer,
ClassTag(cls))
}
+ def apply(schema: StructType): ExpressionEncoder[Row] = {
Review comment:
nit: put a blank line between methods.
--
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]