diff options
author | Wenchen Fan <wenchen@databricks.com> | 2016-01-15 14:20:22 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2016-01-15 14:20:22 -0800 |
commit | 3f1c58d60b85625ab3abf16456ce27c820453ecf (patch) | |
tree | e39332fabdf7b899cbc530108d6c1b90e9565100 | |
parent | 61c45876fb532cdb7278dea48cc141208b63737c (diff) | |
download | spark-3f1c58d60b85625ab3abf16456ce27c820453ecf.tar.gz spark-3f1c58d60b85625ab3abf16456ce27c820453ecf.tar.bz2 spark-3f1c58d60b85625ab3abf16456ce27c820453ecf.zip |
[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.
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala index 397abc7391..dda822d054 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala @@ -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) |