PHILO-HE commented on code in PR #4996:
URL: https://github.com/apache/incubator-gluten/pull/4996#discussion_r1528488705
##########
backends-velox/src/main/scala/io/glutenproject/execution/RowToVeloxColumnarExec.scala:
##########
@@ -47,7 +48,7 @@ case class RowToVeloxColumnarExec(child: SparkPlan) extends
RowToColumnarExecBas
override def doExecuteColumnarInternal(): RDD[ColumnarBatch] = {
BackendsApiManager.getValidatorApiInstance.doSchemaValidate(schema).foreach {
reason =>
- throw new UnsupportedOperationException(
+ throw new GlutenException(
Review Comment:
This exception is thrown when calling `doExecuteColumnar`, which I think
will not be possible to make the operator fall back. So I think we can directly
use `GlutenException` to let the execution fail.
##########
gluten-core/src/main/scala/io/glutenproject/GlutenPlugin.scala:
##########
@@ -144,7 +145,7 @@ private[glutenproject] class GlutenDriverPlugin extends
DriverPlugin with Loggin
// off-heap bytes
if (!conf.contains(GlutenConfig.GLUTEN_OFFHEAP_SIZE_KEY)) {
- throw new
UnsupportedOperationException(s"${GlutenConfig.GLUTEN_OFFHEAP_SIZE_KEY} is not
set")
+ throw new GlutenException(s"${GlutenConfig.GLUTEN_OFFHEAP_SIZE_KEY} is
not set")
Review Comment:
Looks the exception here also cannot make fall back happen, but just let the
execution fail. So I think `GlutenException` may be good. Thanks!
##########
gluten-core/src/main/scala/io/glutenproject/extension/columnar/TransformHintRule.scala:
##########
@@ -737,11 +738,14 @@ case class AddTransformHintRule() extends Rule[SparkPlan]
{
// Currently we assume a plan to be transformable by default.
}
} catch {
- case e: UnsupportedOperationException =>
+ case e @ (_: GlutenNotSupportException | _:
UnsupportedOperationException) =>
Review Comment:
I guess `UnsupportedOperationException` can still be thrown unexpectedly for
some reasons in user's environment. And by still catching it here, the
execution can possibly pass with the help of Gluten's fallback mechanism. So I
feel it may be better to temporarily keep it. Thanks!
--
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]