You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/11 04:32:31 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #27499: [SPARK-30590][SQL] Untyped select API cannot take typed column expression

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

 ##########
 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:
   Hm, but previously `count` case was possible to use it as untyped column.
   
   ```scala
   scala> spark.range(1).select(count("id"), count("id"), count("id"), count("id"), count("id"), count("id")).show()
   +---------+---------+---------+---------+---------+---------+
   |count(id)|count(id)|count(id)|count(id)|count(id)|count(id)|
   +---------+---------+---------+---------+---------+---------+
   |        1|        1|        1|        1|        1|        1|
   +---------+---------+---------+---------+---------+---------+
   
   
   scala> count("id")
   res0: org.apache.spark.sql.TypedColumn[Any,Long] = count(id)
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org