-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14191][SQL] Remove invalid Expand operator constraints #11995
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
Changes from all commits
84821b4
5045c5d
23d6b37
ab89e62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -519,14 +519,15 @@ case class Expand( | |
| projections: Seq[Seq[Expression]], | ||
| output: Seq[Attribute], | ||
| child: LogicalPlan) extends UnaryNode { | ||
|
|
||
| override def references: AttributeSet = | ||
| AttributeSet(projections.flatten.flatMap(_.references)) | ||
|
|
||
| override def statistics: Statistics = { | ||
| val sizeInBytes = super.statistics.sizeInBytes * projections.length | ||
| Statistics(sizeInBytes = sizeInBytes) | ||
| } | ||
|
|
||
| override protected def validConstraints: Set[Expression] = Set.empty[Expression] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also going to add a comment here to explain why this is empty.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. |
||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,6 @@ class ColumnPruningSuite extends PlanTest { | |
| Seq('a, 'b, 'c, 'aa.int, 'gid.int), | ||
| input)).analyze | ||
| val optimized = Optimize.execute(query) | ||
|
|
||
| val expected = | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| Aggregate( | ||
| Seq('aa, 'gid), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is best to avoid spurious changes because it pollutes
git blame. I can revert this while merging this time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Got it.