Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/14116#discussion_r71101023
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
---
@@ -471,6 +480,34 @@ class SessionCatalog(
}
/**
+ * Normalize TableIdentifier by consistently ensuring the following two
rules.
+ * 1. System-side temporary tables should have None as database.
+ * 2. System-side temporary tables should have prefixed table names.
+ * Currently, only INFORMATION_SCHEMA tables are system-side temporary
tables, and this function
+ * returns TableIdentifier("information_schema.databases", None).
+ */
+ protected def normalizeTableIdentifier(name: TableIdentifier):
TableIdentifier = synchronized {
+ if (name.database.isDefined) {
+ if (name.database.contains(INFORMATION_SCHEMA_DATABASE)) {
+ TableIdentifier(s"$INFORMATION_SCHEMA_DATABASE.${name.table}",
None)
+ } else {
+ name
+ }
+ } else {
+ val tableName = formatTableName(name.table)
+ if (tableName.startsWith(INFORMATION_SCHEMA_DATABASE + ".")) {
--- End diff --
Can you explain which cases will enter this processing? Is that possible we
could hit backtick-quoted `INFORMATION_SCHEMA_DATABASE ` here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]