You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "vicennial (via GitHub)" <gi...@apache.org> on 2023/07/12 22:39:43 UTC

[GitHub] [spark] vicennial commented on a diff in pull request #41971: [SPARK-43321][Connect][Followup] Better names for APIs used in Scala Client joinWith

vicennial commented on code in PR #41971:
URL: https://github.com/apache/spark/pull/41971#discussion_r1261790780


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/AgnosticEncoder.scala:
##########
@@ -103,18 +102,18 @@ object AgnosticEncoders {
   }
 
   // Contains a sequence of fields. The fields can be flattened to columns in a row.

Review Comment:
   Nit: can also remove the word "flattened" in this comment here I think



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/AgnosticEncoder.scala:
##########
@@ -37,15 +37,14 @@ import org.apache.spark.util.Utils
  * [[java.sql.Date]] and [[java.time.LocalDate]] are allowed. Deserialization is never lenient; it
  * will always produce instance of the external type.
  *
- * An encoder is flattenable if it contains fields that can be fattened to a row.
  */
 trait AgnosticEncoder[T] extends Encoder[T] {
   def isPrimitive: Boolean
   def nullable: Boolean = !isPrimitive
   def dataType: DataType
   override def schema: StructType = StructType(StructField("value", dataType, nullable) :: Nil)
   def lenientSerialization: Boolean = false
-  def isFlattenable: Boolean = false
+  def isStruct: Boolean = false // set to true if it is a struct encoder

Review Comment:
   Nit: comment seems a bit redundant
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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