Skip to content

Commit ebc738b

Browse files
committed
Update code
1 parent c6fb5a8 commit ebc738b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import org.apache.spark.internal.Logging
2121
import org.apache.spark.sql.catalyst.InternalRow
2222
import org.apache.spark.sql.catalyst.expressions.codegen.{CodegenContext, CodeGenerator, ExprCode, FalseLiteral, JavaCode}
2323
import org.apache.spark.sql.catalyst.expressions.codegen.Block._
24-
import org.apache.spark.sql.errors.QueryExecutionErrors
2524
import org.apache.spark.sql.types._
2625

2726
/**
@@ -77,7 +76,8 @@ object BindReferences extends Logging {
7776
if (allowFailures) {
7877
a
7978
} else {
80-
throw QueryExecutionErrors.cannotFindExpressionInInputAttributesError(a, input)
79+
throw new IllegalStateException(
80+
s"Couldn't find $a in ${input.attrs.mkString("[", ",", "]")}")
8181
}
8282
} else {
8383
BoundReference(ordinal, a.dataType, input(ordinal).nullable)

sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.codehaus.janino.InternalCompilerException
2828
import org.apache.spark.SparkException
2929
import org.apache.spark.sql.catalyst.analysis.UnresolvedGenerator
3030
import org.apache.spark.sql.catalyst.catalog.CatalogDatabase
31-
import org.apache.spark.sql.catalyst.expressions.{AttributeReference, AttributeSeq, Expression, UnevaluableAggregate}
31+
import org.apache.spark.sql.catalyst.expressions.{Expression, UnevaluableAggregate}
3232
import org.apache.spark.sql.types.{DataType, Decimal}
3333
import org.apache.spark.unsafe.array.ByteArrayMethods
3434
import org.apache.spark.unsafe.types.UTF8String
@@ -322,9 +322,4 @@ object QueryExecutionErrors {
322322
def compilerError(e: CompileException): Throwable = {
323323
new CompileException(failedToCompileMsg(e), e.getLocation)
324324
}
325-
326-
def cannotFindExpressionInInputAttributesError(
327-
a: AttributeReference, input: AttributeSeq): Throwable = {
328-
new IllegalStateException(s"Couldn't find $a in ${input.attrs.mkString("[", ",", "]")}")
329-
}
330325
}

0 commit comments

Comments
 (0)