cloud-fan commented on issue #25747: [SPARK-29039][SQL] centralize the catalog and table lookup logic URL: https://github.com/apache/spark/pull/25747#issuecomment-535757609 Hi @rdblue , thanks for your suggestion in https://github.com/apache/spark/pull/25747#discussion_r328844941 I think it works, but then we need to look up catalog twice: once for determine whether it's a v2 catalog, once to resolve the `UnresolvedRelation`. It also introduces duplicated code if we support v2 tables in session catalog later. But this inspires me with a new idea. Instead of keeping a `Seq[String]` in the statement plan, we can keep a `UnresolvedV2Table(tableName: Seq[String], catalog: Option[TableCatalog])`. Then we can have a rule to resolve catalog and set the `UnresolvedV2Table.catalog`, and another rule to resolve `UnresolvedV2Table` to `DataSourceV2Relation`. I'll push a commit to implement this idea soon.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
