PHILO-HE commented on code in PR #11495:
URL:
https://github.com/apache/incubator-gluten/pull/11495#discussion_r2740214851
##########
gluten-core/src/main/scala/org/apache/spark/util/SparkVersionUtil.scala:
##########
@@ -17,11 +17,10 @@
package org.apache.spark.util
object SparkVersionUtil {
- val lteSpark32: Boolean = compareMajorMinorVersion((3, 2)) <= 0
private val comparedWithSpark33 = compareMajorMinorVersion((3, 3))
private val comparedWithSpark35 = compareMajorMinorVersion((3, 5))
val eqSpark33: Boolean = comparedWithSpark33 == 0
- val lteSpark33: Boolean = lteSpark32 || eqSpark33
+ val lteSpark33: Boolean = comparedWithSpark33 <= 0
Review Comment:
Nit: Maybe, we can just remove this and use `eqSpark33` on the caller side
instead.
##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/transition/Convention.scala:
##########
@@ -171,20 +170,7 @@ object Convention {
this: SparkPlan =>
final override def rowType(): RowType = {
- if (SparkVersionUtil.lteSpark32) {
- // It's known that in Spark 3.2, one Spark plan node is considered
either only having
- // row-based support or only having columnar support at a time.
- // Hence, if the plan supports columnar output, we'd disable its
row-based support.
- // The same for the opposite.
- if (supportsColumnar) {
- Convention.RowType.None
- } else {
- assert(rowType0() != Convention.RowType.None)
- rowType0()
- }
- } else {
- rowType0()
- }
+ rowType0()
Review Comment:
It seems we can do a more thorough cleanup. My understanding is,
`KnownRowTypeForSpark33OrLater` was introduced for specially handling Spark
3.2. Now that Spark 3.2 has been deprecated, can we remove this trait and
directly use `KnownRowType` instead?
--
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]