You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/19 06:36:11 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #31885: [SPARK-34636][FOLLOWUP][SQL] Fix an imcompatible behavior of UnresolvedAttribute.sql
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org