dilipbiswal edited a comment on issue #24150: [SPARK-27209][SQL] Split parsing of SELECT and INSERT into two top-level rules in the grammar file. URL: https://github.com/apache/spark/pull/24150#issuecomment-475666231 @cloud-fan @viirya **Update** Basically i was trying to understand and answer the question both of you have raised which is why make insertInto optional if we are splitting insert and select ? The only test that fails after making `insertInto` mandatory in `multiInsertQueryBody` is PlanParserSuite:"test("multi select query")". Currently we allow multi insert and multi select queries like following : ``` FROM T1 INSERT INTO T2 SELECT WHERE <condition> INSERT INTO T3 SELECT WHERE <another_condition> ``` AND ``` FROM T1 SELECT C1 WHERE <condition> SELECT C1 WHERE <another_condition> ``` Given **only the planParseSuite is affected**, my thinking is , this multi select support is NOT really something we were designing to support. What we wanted to support is a `insert into.. select from`. Currently we plan the multi-select queries by simply unioning each branch. My question is , is this something we should continue to support ? Since there are better ways to support union queries, i am wondering why would users ever want to use this way ? WDYT ?
---------------------------------------------------------------- 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]
