cloud-fan commented on code in PR #47401:
URL: https://github.com/apache/spark/pull/47401#discussion_r1688116969
##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -88,7 +88,10 @@ class StringType private(val collationId: Int) extends
AtomicType with Serializa
*/
@Stable
case object StringType extends StringType(0) {
- private[spark] def apply(collationId: Int): StringType = new
StringType(collationId)
+ private[spark] def apply(collationId: Int): StringType = {
Review Comment:
I checked several callers of this function. The input collation id is mostly
calculated from collation name. This assertion doesn't seem to be necessary and
it's not cheap. Shall we revert?
I'm fine with other cleanups in this PR.
--
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]