Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-49022][CONNECT][SQL][FOLLOW-UP] Parse unresolved identifier to keep the behavior same #48376

Closed
wants to merge 3 commits into from

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

@@ -74,7 +74,7 @@ private[sql] trait ColumnNodeToExpressionConverter extends (ColumnNode => Expres
analysis.UnresolvedRegex(columnNameRegex, Some(nameParts), conf.caseSensitiveAnalysis)

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

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