Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19022#discussion_r134684892
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
---
@@ -289,14 +289,15 @@ abstract class UnaryNode extends LogicalPlan {
* expressions with the corresponding alias
*/
protected def getAliasedConstraints(projectList: Seq[NamedExpression]):
Set[Expression] = {
- var allConstraints = child.constraints.asInstanceOf[Set[Expression]]
+ var allConstraints = child.constraints
projectList.foreach {
case a @ Alias(e, _) =>
// For every alias in `projectList`, replace the reference in
constraints by its attribute.
- allConstraints ++= allConstraints.map(_ transform {
+ val replacedElement = allConstraints.map(_ transform {
--- End diff --
By overriding `++`, we don't need to change those.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]