LuciferYang commented on code in PR #12954:
URL: https://github.com/apache/gluten/pull/12954#discussion_r3950250241
##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxSparkPlanExecApi.scala:
##########
@@ -1467,13 +1467,12 @@ class VeloxSparkPlanExecApi extends SparkPlanExecApi
with Logging {
left: ExpressionTransformer,
right: ExpressionTransformer,
original: Expression): ExpressionTransformer = {
- // Since spark 3.3.0
- val extract =
-
SparkShimLoader.getSparkShims.extractExpressionTimestampDiffUnit(original)
- if (extract.isEmpty) {
- throw new UnsupportedOperationException(s"Not support expression
TimestampDiff.")
+ val unit = original match {
+ case timestampDiff: TimestampDiff => timestampDiff.unit
+ case _ =>
+ throw new UnsupportedOperationException(s"Not support expression
TimestampDiff.")
}
Review Comment:
Both copies lost the pointless `s` prefix: `TimestampDiff` in the first
round here, `TimestampAdd` after @jackylee-ch pointed out that fixing one made
the other the odd one out.
The wording itself I left alone. The identical string also sits in
`CHSparkPlanExecApi`, which this PR does not touch, so rewording only the
copies in reach would split the pair.
--
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]