Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with GpuAttributeReference not overrideing references #200

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.nvidia.spark.rapids
import java.util.Objects

import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute
import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference, Expression, ExprId, Generator, NamedExpression}
import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference, AttributeSet, Expression, ExprId, Generator, NamedExpression}
import org.apache.spark.sql.catalyst.plans.logical.EventTimeWatermark
import org.apache.spark.sql.catalyst.util.quoteIdentifier
import org.apache.spark.sql.types.{DataType, Metadata}
Expand All @@ -32,7 +32,7 @@ case class GpuAlias(child: GpuExpression, name: String)(
extends GpuUnaryExpression with NamedExpression {

// Alias(Generator, xx) need to be transformed into Generate(generator, ...)
override lazy val resolved =
override lazy val resolved: Boolean =
childrenResolved && checkInputDataTypes().isSuccess && !child.isInstanceOf[Generator]

override def dataType: DataType = child.dataType
Expand Down Expand Up @@ -217,6 +217,9 @@ case class GpuAttributeReference(
override def toAttribute: Attribute =
AttributeReference(name, dataType, nullable, metadata)(exprId, qualifier)

@transient
override lazy val references: AttributeSet = AttributeSet(toAttribute)

override def columnarEval(batch: ColumnarBatch): Any =
throw new IllegalStateException("Attribute executed without being bound")
}