Description
The quotedString method in TableIdentifier and FunctionIdentifier produce an illegal (un-parseable) name when the name contains a backtick. For example:
import org.apache.spark.sql.catalyst.parser.CatalystSqlParser._ import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute val complexName = TableIdentifier("`weird`table`name", Some("`d`b`1")) parseTableIdentifier(complexName.unquotedString) // Does not work parseTableIdentifier(complexName.quotedString) // Does not work UnresolvedAttribute.parseAttributeName(complexName.unquotedString) // Does not work UnresolvedAttribute.parseAttributeName(complexName.quotedString) // Does not work
The quotedString method should escape backticks properly.