hvanhovell commented on PR #41928:
URL: https://github.com/apache/spark/pull/41928#issuecomment-1679847802
@JackBuggins while `StructType` is definitely stable & public API, the
`toAttributes` methods was not. It was clearly marked as `protected[sql]` and
it returned a sequence of an internal catalyst type (`Attribute`). We can
always change those methods.
There is no real way to bring back this particular method. We can however
provide an implicit conversion that will make life a bit easier, e.g.:
```scala
implicit class RichStructType(val schema: StructType) extends AnyVal {
def toAttributes: Seq[Attribute] = DataTypeUtils.toAttributes(schema)
}
```
--
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]