Skip to content

Conversation

HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR is a followup of #47688 that keeps Column.toString as the same before.

Why are the changes needed?

To keep the same behaviour with Spark Classic and Connect.

Does this PR introduce any user-facing change?

No, the main change has not been released out yet.

How was this patch tested?

Will be added separately. I manually tested:

import org.apache.spark.sql.functions.col
val name = "with`!@#$%dot".replace("`", "``")
col(s"`${name}`").toString.equals("with`!@#$%dot")

Was this patch authored or co-authored using generative AI tooling?

No.

@HyukjinKwon
Copy link
Member Author

cc @hvanhovell

@HyukjinKwon HyukjinKwon force-pushed the SPARK-49022-followup branch from 4e6ccd9 to b27c4c1 Compare October 8, 2024 02:12

case UnresolvedRegex(unparsedIdentifier, planId, _) =>
convertUnresolvedAttribute(unparsedIdentifier, planId, isMetadataColumn = false)
convertUnresolvedRegex(unparsedIdentifier, planId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a bit inconsistent with unresolved attributes. Is this observable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine in a way that it's consistent with catalyst ..

@HyukjinKwon HyukjinKwon force-pushed the SPARK-49022-followup branch from a05df9b to 8e586a5 Compare October 8, 2024 03:17
@HyukjinKwon HyukjinKwon force-pushed the SPARK-49022-followup branch from f4580b8 to 2ad70f4 Compare October 8, 2024 06:16
@HyukjinKwon
Copy link
Member Author

Let me merge this @hvanhovell please let me know if there are some more things to change, I will make another PR.

@HyukjinKwon
Copy link
Member Author

Merged to master.

himadripal pushed a commit to himadripal/spark that referenced this pull request Oct 19, 2024
… keep the behavior same

### What changes were proposed in this pull request?

This PR is a followup of apache#47688 that keeps `Column.toString` as the same before.

### Why are the changes needed?

To keep the same behaviour with Spark Classic and Connect.

### Does this PR introduce _any_ user-facing change?

No, the main change has not been released out yet.

### How was this patch tested?

Will be added separately. I manually tested:

```scala
import org.apache.spark.sql.functions.col
val name = "with`!#$%dot".replace("`", "``")
col(s"`${name}`").toString.equals("with`!#$%dot")
```

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#48376 from HyukjinKwon/SPARK-49022-followup.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants