Github user jayadevanmurali commented on a diff in the pull request:
https://github.com/apache/spark/pull/10983#discussion_r51342667
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
@@ -747,7 +747,7 @@ class SQLContext private[sql](
* only during the lifetime of this instance of SQLContext.
*/
private[sql] def registerDataFrameAsTable(df: DataFrame, tableName:
String): Unit = {
- catalog.registerTable(TableIdentifier(tableName), df.logicalPlan)
+ catalog.registerTable(SqlParser.parseTableIdentifier(tableName),
df.logicalPlan)
--- End diff --
Ok I can see the variable definition at line 211 of SqlContext.scala
@transient
protected[sql] val sqlParser = new SparkSQLParser(getSQLDialect().parse(_))
But this varable is not used anywhare.All methods use
Sqlarser.parseTableIdentifier() for example @Experimental
def createExternalTable(
tableName: String,
source: String,
options: Map[String, String]): DataFrame = {
**val tableIdent = SqlParser.parseTableIdentifier(tableName)**
val cmd =
CreateTableUsing(
tableIdent,
userSpecifiedSchema = None,
source,
temporary = false,
options,
allowExisting = false,
managedIfNoPath = false)
executePlan(cmd).toRdd
table(tableIdent)
}
Correct me if am wrong.
---
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]