peter-toth commented on code in PR #57759:
URL: https://github.com/apache/spark/pull/57759#discussion_r3714588354


##########
sql/api/src/main/scala/org/apache/spark/sql/Column.scala:
##########
@@ -30,11 +30,17 @@ import org.apache.spark.sql.internal.{ColumnNode, 
TableValuedFunctionArgument}
 import org.apache.spark.sql.types._
 import org.apache.spark.util.ArrayImplicits._
 
-private[spark] object Column {
+/**
+ * The companion object is public so that extension developers can reference 
the `Column` type as
+ * a value, which is what makes the `Column(expression)` factory provided by
+ * `org.apache.spark.sql.classic.ClassicConversions.ColumnConstructorExt` 
usable outside of the
+ * `org.apache.spark` package. All of its members intentionally stay internal.
+ */
+object Column {

Review Comment:
   Good catch, thanks. I went with `@DeveloperApi` (plus `@since 4.4.0`) in 
f4b2d232a86.
   
   Reasoning: everything that makes `Column(expression)` work is already 
`@DeveloperApi` — `ClassicConversions` and `ColumnConstructorExt` — so the path 
is only as stable as those, and `@Stable` on the companion would over-promise. 
The object also has no public members; it is public purely so the type can be 
named as a value.
   
   The counter-argument, in case you'd rather have `@Stable`: `@DeveloperApi` 
does let us make the object private again in a minor release, which would 
re-break the use case this PR fixes. Happy to switch if you prefer that 
guarantee.
   



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