Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/4506#discussion_r26002314
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
@@ -783,7 +783,7 @@ class SQLContext(@transient val sparkContext:
SparkContext)
/** Returns the specified table as a [[DataFrame]]. */
def table(tableName: String): DataFrame =
- DataFrame(this, catalog.lookupRelation(Seq(tableName)))
+ DataFrame(this, UnresolvedRelation(Seq(tableName)))
--- End diff --
My point here is we should leave the Relation Resolution for `SQLContext`
or its extension, through in most of case, the relation resolution resort to
`catalog.lookupRelation`, but we never know if the logic will be changed or
not, particularly for the extensions. In #4784, it will returns an unresolved
relation for `catalog.lookupRelation`, which required further analysis, it's
maybe not the strong reason that we need to change code here, but it gives us
an example that `catalog.lookupRelation` does not always act as the `eager
analysis`.
---
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]