sarutak commented on a change in pull request #31854:
URL: https://github.com/apache/spark/pull/31854#discussion_r598029653
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala
##########
@@ -206,8 +206,13 @@ object UnresolvedAttribute {
val char = name(i)
if (inBacktick) {
if (char == '`') {
- inBacktick = false
- if (i + 1 < name.length && name(i + 1) != '.') throw e
+ if (i + 1 < name.length && name(i + 1) == '`') {
Review comment:
I found replacing with `CatlystSqlParser.parseMultipartIdentifier`
breaks API compatibility.
If a string passed to `UnresolvedAttribute.parseAttributeName` contains
quoted parts, each of them is regarded as a complete name part.
Otherwise, each unquoted part is regarded as name parts which can be
separated by `.` and each name part doesn't need to be quoted.
So, this is valid for `parseAttributeName` but not for
`parseMultipartIdentifier`.
```
UnresolvedAttribute.parseAttributeName("*# !.`abc`")
```
So, I restore this part.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]