Skip to content

Commit

Permalink
Resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JkSelf committed Aug 15, 2024
1 parent fd8ed0b commit 937c1b3
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ package org.apache.gluten.expression

import org.apache.gluten.GlutenConfig
import org.apache.gluten.backendsapi.BackendsApiManager
import org.apache.gluten.exception.GlutenException
import org.apache.gluten.expression.ExpressionNames._
import org.apache.gluten.extension.{DefaultExpressionExtensionTransformer, ExpressionExtensionTrait}
import org.apache.gluten.extension.ExpressionExtensionTrait
import org.apache.gluten.sql.shims.SparkShimLoader

import org.apache.spark.sql.catalyst.expressions._
Expand Down Expand Up @@ -357,7 +358,11 @@ object ExpressionMappings {
private var expressionExtensionTransformer: Option[ExpressionExtensionTrait] = None

def getExpressionExtensionTransformer: ExpressionExtensionTrait = {
expressionExtensionTransformer.getOrElse(new DefaultExpressionExtensionTransformer)
if (expressionExtensionTransformer.isEmpty) {
throw new GlutenException(
"The expressionExtensionTransformer is not set properly when ini driver or executor")
}
expressionExtensionTransformer.get
}

def setExpressionExtensionTransformer(value: ExpressionExtensionTrait): Unit = {
Expand Down

0 comments on commit 937c1b3

Please sign in to comment.