viirya commented on a change in pull request #27499: [SPARK-30590][SQL] Untyped
select API cannot take typed column expression
URL: https://github.com/apache/spark/pull/27499#discussion_r377456180
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -1430,6 +1430,11 @@ class Dataset[T] private[sql](
*/
@scala.annotation.varargs
def select(cols: Column*): DataFrame = withPlan {
Review comment:
It cannot work because typed column's output is a domain object instead of a
column. That is why untyped `select` returns DataFrame and typed `select`
returns Dataset[U1], Dataset[(U1, U2)], Dataset[(U1, U2, U3)]...
`count` is possible before because it is actually untyped column but wrongly
being wrapped in a typed column.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]