xianyinxin commented on issue #26167: [SPARK-28893][SQL] Support MERGE INTO in the parser and add the corresponding logical plan URL: https://github.com/apache/spark/pull/26167#issuecomment-549768500 @cloud-fan , I have some doubts. As the doc in `ParsedStatement`, a `ParsedStatement` is not resolved because it need to be converted to concrete logical plan later. For the currents statements, all of them are commands, which will be converted to `Command` after analyze phase, and the final command is resolved. To remove the redundant step that convert a logical plan to another form, I think a better choice is parse the sql to `MergeIntoTable` which is an unresolved command, and after analyzing, it becomes a resolved merge into command. However, I checked some other command like `CreateTable` in v1, it is parsed to a resolvable logical plan, and finally be converted to a concrete command like `CreateHiveTableAsSelectCommand` in analyze phase, the behaves of which is a little like the translation from `MergeIntoStatement` to `MergeIntoTable`. The different is, in the former, converting `CreateTable` to `CreateHiveTableAsSelectCommand` is at the late period of analyze process, and converting ` MergeIntoStatement` to `MergeIntoTable` is at the beginning period of the analyze process.
---------------------------------------------------------------- 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]
