dongjoon-hyun commented on code in PR #49506: URL: https://github.com/apache/spark/pull/49506#discussion_r1917524225
########## sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/QuotingUtils.scala: ########## @@ -45,12 +45,12 @@ object QuotingUtils { private val validIdentPattern = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*") + def needQuote(part: String): Boolean = { + !validIdentPattern.matcher(part).matches() + } + def quoteIfNeeded(part: String): String = { - if (validIdentPattern.matcher(part).matches()) { - part - } else { - quoteIdentifier(part) - } + if (needQuote(part)) quoteIdentifier(part) else part Review Comment: At the first glance, there is no logical change. Do we need to touch this file? -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org