cloud-fan commented on a change in pull request #25507: [SPARK-28667][SQL] 
Support InsertInto through the V2SessionCatalog 
URL: https://github.com/apache/spark/pull/25507#discussion_r317519172
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -770,40 +760,35 @@ class Analyzer(
 
   object ResolveInsertInto extends Rule[LogicalPlan] {
     override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators 
{
-      case i @ InsertIntoStatement(
 
 Review comment:
   Since we are cleaning up the code here, how about we make the responsibility 
of each rule more clear? What I have in my mind is:
   1. `ResolveInsertInto` should only resolve the `InsertIntoStatement`, 
instead of the relation itself. Ideally it should only match 
`InsertIntoStatement(DataSourceV2Relation, ...)`, and let other rules to 
resolve relations.
   2. `ResolveTables` should resolve `UnresolvedRelation` inside 
`InsertIntoStatement`, similar to the existing `ResolveRelations` rule.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to