[ https://issues.apache.org/jira/browse/HIVE-7646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14104290#comment-14104290 ]
Alan Gates commented on HIVE-7646: ---------------------------------- +1 This isn't a big deal and I don't think we should hold the patch for it, but I have a question. If I read the spec correctly a query like: select * from (values((1, 2, 3),(4, 5, 6)); should be legal. At FromClauseParser.g, line 290 you are requiring a tableNameColList as part of the virtualTableSource. This means the user always has to do a table definition after the values clause, so the above would become: select * from (values((1, 2, 3),(4, 5, 6)) as foo(a int, b int, c int); This makes sense since the more common case is probably: select a, count(b) from (values((1, 2, 3),(4, 5, 6)) as foo(a int, b int, c int) group by a where c > 4; or something, in which case the table definition is required. But the main question is am I misreading the spec or are we just adding the requirement for the table definition in all cases? I think it's ok if we're adding it, as this is primarily for our own testing purposes. > Modify parser to support new grammar for Insert,Update,Delete > ------------------------------------------------------------- > > Key: HIVE-7646 > URL: https://issues.apache.org/jira/browse/HIVE-7646 > Project: Hive > Issue Type: Sub-task > Components: Query Processor > Affects Versions: 0.13.1 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Attachments: HIVE-7646.1.patch, HIVE-7646.2.patch, HIVE-7646.3.patch, > HIVE-7646.patch > > > need parser to recognize constructs such as : > {code:sql} > INSERT INTO Cust (Customer_Number, Balance, Address) > VALUES (101, 50.00, '123 Main Street'), (102, 75.00, '123 Pine Ave'); > {code} > {code:sql} > DELETE FROM Cust WHERE Balance > 5.0 > {code} > {code:sql} > UPDATE Cust > SET column1=value1,column2=value2,... > WHERE some_column=some_value > {code} > also useful > {code:sql} > select a,b from values((1,2),(3,4)) as FOO(a,b) > {code} > This makes writing tests easier. > Some references: > http://dev.mysql.com/doc/refman/5.6/en/insert.html > http://msdn.microsoft.com/en-us/library/dd776382.aspx -- This message was sent by Atlassian JIRA (v6.2#6252)