cloud-fan commented on a change in pull request #31885:
URL: https://github.com/apache/spark/pull/31885#discussion_r597436968
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -778,11 +778,11 @@ class ExpressionParserSuite extends AnalysisTest {
test("SPARK-17832 function identifier contains backtick") {
val complexName = FunctionIdentifier("`ba`r", Some("`fo`o"))
- assertEqual(complexName.quotedString, UnresolvedAttribute("`fo`o.`ba`r"))
+ assertEqual(complexName.quotedString,
UnresolvedAttribute("```fo``o`.```ba``r`"))
Review comment:
nit: `UnresolvedAttribute(Seq("`fo`o", "`ba`r"))` to make it more obvious
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -778,11 +778,11 @@ class ExpressionParserSuite extends AnalysisTest {
test("SPARK-17832 function identifier contains backtick") {
val complexName = FunctionIdentifier("`ba`r", Some("`fo`o"))
- assertEqual(complexName.quotedString, UnresolvedAttribute("`fo`o.`ba`r"))
+ assertEqual(complexName.quotedString,
UnresolvedAttribute("```fo``o`.```ba``r`"))
intercept(complexName.unquotedString, "mismatched input")
// Function identifier contains continuous backticks should be treated
correctly.
val complexName2 = FunctionIdentifier("ba``r", Some("fo``o"))
- assertEqual(complexName2.quotedString, UnresolvedAttribute("fo``o.ba``r"))
+ assertEqual(complexName2.quotedString,
UnresolvedAttribute("`fo````o`.`ba````r`"))
Review comment:
ditto
--
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]