cloud-fan commented on code in PR #54223:
URL: https://github.com/apache/spark/pull/54223#discussion_r2871361782


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala:
##########
@@ -70,62 +71,63 @@ object RowEncoder extends DataTypeErrorsBase {
   }
 
   private[sql] def encoderForDataType(dataType: DataType, lenient: Boolean): 
AgnosticEncoder[_] =

Review Comment:
   nit: we can organize the code in a way to reduce diff
   ```
   private[sql] def encoderForDataType(dataType: DataType, lenient: Boolean): 
AgnosticEncoder[_] =
     
TypeApiOps(dataType).map(_.getEncoder).getOrElse(encoderForDataTypeLegacy(dataType,
 lenient))
   
   private def encoderForDataTypeLegacy(dataType: DataType, lenient: Boolean): 
AgnosticEncoder[_] =
     // the original implementation
   ```



-- 
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]

Reply via email to