beliefer commented on a change in pull request #35823:
URL: https://github.com/apache/spark/pull/35823#discussion_r827552580



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/AliasHelper.scala
##########
@@ -77,6 +85,17 @@ trait AliasHelper {
     }).asInstanceOf[NamedExpression]
   }
 
+  /**
+   * Replace all alias, with the aliased attribute.
+   */
+  protected def replaceAliasWithAttr(
+      expr: NamedExpression,
+      aliasMap: AttributeMap[Alias]): NamedExpression = {
+    replaceAliasButKeepName(expr, aliasMap).transform {
+      case Alias(attr: Attribute, _) => attr

Review comment:
       Attribute in groupingExpressions may be alias. Before push down SQL to 
JDBC, I want replace the alias Attribute with origin Attribute, not the Alias.
   




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to