You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2023/11/27 07:36:24 UTC

[PR] [SPARK-46119][SQL] Override toString method for UnresolvedAlias [spark]

wangyum opened a new pull request, #44038:
URL: https://github.com/apache/spark/pull/44038

   ### What changes were proposed in this pull request?
   
   This PR overrides `toString` method for `UnresolvedAlias`.
   
   ### Why are the changes needed?
   
   Improve readability.
   
   Before:
   ```
   unresolvedalias((cast('dt as timestamp) = 2023-01-02 01:00:00), Some(org.apache.spark.sql.Column$$Lambda$3109/0x0000000801f62838@ea45a5b))
   ```
   
   After:
   ```
   unresolvedalias(cast('dt as timestamp) = 2023-01-02 01:00:00)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manual testing.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46119][SQL] Override `toString` method for `UnresolvedAlias` [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #44038: [SPARK-46119][SQL] Override `toString` method for `UnresolvedAlias`
URL: https://github.com/apache/spark/pull/44038


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46119][SQL] Override toString method for UnresolvedAlias [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44038:
URL: https://github.com/apache/spark/pull/44038#discussion_r1405759170


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala:
##########
@@ -713,6 +713,8 @@ case class UnresolvedAlias(
 
   override lazy val resolved = false
 
+  override def toString: String = prettyName + s"${child.toString}"

Review Comment:
   ```suggestion
     override def toString: String = s"${prettyName}{child.toString}"
   ```
   
   or
   
   ```suggestion
     override def toString: String = prettyName + child.toString
   ```
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org