You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2026/03/02 09:27:54 UTC

Re: [PR] [SPARK-55440][SQL] Types Framework - Phase 1a - Core Type System Foundation [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org