cloud-fan commented on a change in pull request #30488: URL: https://github.com/apache/spark/pull/30488#discussion_r530424929
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala ########## @@ -178,7 +179,17 @@ case class Alias(child: Expression, name: String)( override def toAttribute: Attribute = { if (resolved) { - AttributeReference(name, child.dataType, child.nullable, metadata)(exprId, qualifier) + val metadataWithoutId = + if (SQLConf.get.getConf(SQLConf.FAIL_AMBIGUOUS_SELF_JOIN_ENABLED)) { Review comment: can you explain the reason? It's hacky to do it inside the catalyst framework. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org