clownxc commented on code in PR #40400:
URL: https://github.com/apache/spark/pull/40400#discussion_r1149320479
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/PhysicalDataType.scala:
##########
@@ -19,48 +19,83 @@ package org.apache.spark.sql.catalyst.types
import org.apache.spark.sql.types._
-sealed abstract class PhysicalDataType
-
-case class PhysicalArrayType(elementType: DataType, containsNull: Boolean)
extends PhysicalDataType
-
-class PhysicalBinaryType() extends PhysicalDataType
+sealed abstract class PhysicalDataType{
+ private[sql] def isPrimitive: Boolean
+}
+
+case class PhysicalArrayType(elementType: DataType, containsNull: Boolean)
+ extends PhysicalDataType {
+ override def isPrimitive: Boolean = false
+}
+
+class PhysicalBinaryType() extends PhysicalDataType {
+ override def isPrimitive: Boolean = false
+}
case object PhysicalBinaryType extends PhysicalBinaryType
-class PhysicalBooleanType() extends PhysicalDataType
+class PhysicalBooleanType() extends PhysicalDataType {
+ override def isPrimitive: Boolean = true
Review Comment:
Thank you for the code review comments, I will try to modify the code as
you say.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]