olaky commented on code in PR #46734:
URL: https://github.com/apache/spark/pull/46734#discussion_r1615729683


##########
sql/api/src/main/scala/org/apache/spark/sql/types/StructField.scala:
##########
@@ -124,6 +124,13 @@ case class StructField(
       throw SparkException.internalError(s"Unexpected data type $dt")
   }
 
+  /**
+   * Updates the StructField with a new dataType.
+   */
+  def withNewType(dataType: DataType): StructField = {

Review Comment:
   ```suggestion
     private [sql] def withNewType(dataType: DataType): StructField = {
   ```
   Or even something more restrictive please because this must not be called if 
equalsIgnoreCompatibleCollation does not hold. Do we maybe not put it here but 
in ddl.scala? I believe copy is public



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