You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2023/03/28 19:59:57 UTC
[GitHub] [spark] amaliujia commented on a diff in pull request #40400: [SPARK-41359][SQL] Use `PhysicalDataType` instead of DataType in UnsafeRow
amaliujia commented on code in PR #40400:
URL: https://github.com/apache/spark/pull/40400#discussion_r1151093946
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/PhysicalDataType.scala:
##########
@@ -19,43 +19,46 @@ package org.apache.spark.sql.catalyst.types
import org.apache.spark.sql.types._
+
sealed abstract class PhysicalDataType
+sealed abstract class PhysicalPrimitiveType extends PhysicalDataType
Review Comment:
Just for my own education:
what is the pros/cons of adding `class` versus `trait` to act as base and shared interface here?
I am thinking to move some DataType stuff to here and one example is the Ordering implementation which I thought to define as a trait but not a `PhysicalDataTypeWithOrdering` class
```
trait Ordering {
private[sql] type InternalType
private[sql] val tag: TypeTag[InternalType]
private[sql] val ordering: Ordering[InternalType]
}
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/PhysicalDataType.scala:
##########
@@ -19,43 +19,46 @@ package org.apache.spark.sql.catalyst.types
import org.apache.spark.sql.types._
+
sealed abstract class PhysicalDataType
+sealed abstract class PhysicalPrimitiveType extends PhysicalDataType
Review Comment:
cc @cloud-fan
--
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