You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/16 14:08:22 UTC

[GitHub] [spark] cloud-fan commented on pull request #29893: [SPARK-32976][SQL]Support column list in INSERT statement

cloud-fan commented on pull request #29893:
URL: https://github.com/apache/spark/pull/29893#issuecomment-728078000


   Sorry for the late review. I have a simpler idea about how to implement it:
   1. Add a new field `userSpecifiedColums` to `InsertIntoStatement`.
   2. Add a new analyzer rule to resolve `InsertIntoStatement` whose `userSpecifiedColums` is not Nil, by adding a project to the input query to reorder the columns. This rule will set `userSpecifiedColums` to Nil at the end, so that it's idempotent.
   3. Other rules that match `InsertIntoStatement` should wait until `userSpecifiedColums` is Nil.
   
   Thus we don't need to change the v2 write commands.


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



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