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/25 08:27:26 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27499: [SPARK-30590][SQL] Untyped select API cannot take typed column expression that needs input type

cloud-fan commented on a change in pull request #27499: [SPARK-30590][SQL] Untyped select API cannot take typed column expression that needs input type
URL: https://github.com/apache/spark/pull/27499#discussion_r383721848
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/Column.scala
 ##########
 @@ -97,6 +97,17 @@ class TypedColumn[-T, U](
     new TypedColumn[T, U](newExpr, encoder)
   }
 
+  /**
+   * This method is used internally in SparkSQL to check if a `TypedColumn` has been inserted with
+   * specific input type and schema by `withInputType`.
+   */
+  private[sql] def needInputType: Boolean = {
+    expr.find {
+      case ta: TypedAggregateExpression if ta.inputDeserializer.isEmpty => true
 
 Review comment:
   nit: `case ta: TypedAggregateExpression => ta.inputDeserializer.isEmpty`

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