impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Updates to DML statements for Impala + Kudu
Date Wed, 11 Jan 2017 02:23:30 GMT
Todd Lipcon has posted comments on this change.

Change subject: Updates to DML statements for Impala + Kudu
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/5646/1/docs/topics/impala_delete.xml
File docs/topics/impala_delete.xml:

Line 49: DELETE [FROM] [<varname>database_name</varname>].<varname>table_name</varname>
[ WHERE <varname>where_conditions</varname> ]
I think there is another form to describe:

DELETE <table_ref> FROM <table ref list> WHERE ..

eg:
DELETE t1 from todd_test t1 JOIN todd_test2 t2 ON t1.o_orderkey = t2.o_orderkey;


PS1, Line 65:  <p>
            :       Normally, a <codeph>DELETE</codeph> operation for a Kudu table
fails if
            :       some partition key columns are not found, due to their being deleted or
changed
            :       by a concurrent <codeph>UPDATE</codeph> or <codeph>DELETE</codeph>
operation.
            :       Specify <codeph>DELETE IGNORE <varname>rest_of_statement</varname></codeph>
to
            :       make the <codeph>DELETE</codeph> continue in this case. The
rows with the nonexistent
            :       duplicate partition key column values are not removed.
            :     </p>
I don't think this is relevant anymore (the IGNORE keyword is gone)


Line 101: <!-- To do: investigate if the table reference can actually be a join clause,
to delete from multiple tables at once. -->
Yes it can, using syntax like:

DELETE c FROM my_second_table c, stock_symbols s WHERE c.name = s.symbol;

(but it only deletes from one of the tables)

Can also use JOIN syntax as shown above


http://gerrit.cloudera.org:8080/#/c/5646/1/docs/topics/impala_update.xml
File docs/topics/impala_update.xml:

Line 50:   [ WHERE <varname>where_conditions</varname> ]
similar to my comment on the DELETE, this can support UPDATE with JOIN


-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jrussell@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <ambreen.kazi@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jdcryans@apache.org>
Gerrit-Reviewer: John Russell <jrussell@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <todd@apache.org>
Gerrit-HasComments: Yes

Mime
View raw message