Skip to content
Snippets Groups Projects
Commit 3f1c58d6 authored by Wenchen Fan's avatar Wenchen Fan Committed by Michael Armbrust
Browse files

[SQL][MINOR] BoundReference do not need to be NamedExpression

We made it a `NamedExpression` to workaroud some hacky cases long time ago, and now seems it's safe to remove it.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #10765 from cloud-fan/minor.
parent 61c45876
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ import org.apache.spark.sql.types._
* the layout of intermediate tuples, BindReferences should be run after all such transformations.
*/
case class BoundReference(ordinal: Int, dataType: DataType, nullable: Boolean)
extends LeafExpression with NamedExpression {
extends LeafExpression {
override def toString: String = s"input[$ordinal, ${dataType.simpleString}]"
......@@ -58,16 +58,6 @@ case class BoundReference(ordinal: Int, dataType: DataType, nullable: Boolean)
}
}
override def name: String = s"i[$ordinal]"
override def toAttribute: Attribute = throw new UnsupportedOperationException
override def qualifiers: Seq[String] = throw new UnsupportedOperationException
override def exprId: ExprId = throw new UnsupportedOperationException
override def newInstance(): NamedExpression = this
override def genCode(ctx: CodegenContext, ev: ExprCode): String = {
val javaType = ctx.javaType(dataType)
val value = ctx.getValue(ctx.INPUT_ROW, dataType, ordinal.toString)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment