You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "John Russell (Code Review)" <ge...@cloudera.org> on 2017/01/09 22:04:12 UTC

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

John Russell has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5646

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

Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 221 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/5646/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

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


Patch Set 1:

(1 comment)

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> ]
> Example of the syntax? I get errors trying to put the join clause in differ
looks like the syntax is:

      UPDATE [target_alias|target_table_ref]
      SET COL = VAL [, COL = VAL]
      [FROM [table_ref, ...]]
      [WHERE ...]

eg:

UPDATE t1 SET c1='val' FROM t1 JOIN t2 ON t1.foo = t2.foo WHERE ...


-- 
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 <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has posted comments on this change.

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


Patch Set 1:

(2 comments)

All comments addressed. I suggest we expedite the +2'ing of this one so we can get a clear picture in master of the various places touched by Kudu, and then if we want to add more details or examples, we'll follow up with a separate code review.

http://gerrit.cloudera.org:8080/#/c/5646/1//COMMIT_MSG
Commit Message:

PS1, Line 7: Updates to DML statements for Impala + Kudu
> FYI: I posted this PDF:
Done


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> ]
> looks like the syntax is:
Done


-- 
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 <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
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 <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

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


Patch Set 5: Verified+1

-- 
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: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

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


Patch Set 3:

the pdf doesn't seem to include the recent changes, can you update it?

-- 
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: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has posted comments on this change.

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


Patch Set 5:

(11 comments)

Addressed all MJ's comments.

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

PS4, Line 79:     <p>
            :       The conditions in the <codeph>WHERE</codeph> clause can refer to
            :       any combination of primary key columns or other columns. Referring to
            :       pr
> maybe worth mentioning that predicates on the PK will be faster- this still
Done


PS4, Line 89: 
> The
Done


PS4, Line 88: >
            : 
            :     <p>
> seems to duplicate the stmt 2 above
Done


PS4, Line 93:       intuitively expect:
            :     </p>
            :     <ul>
            :       <li>
            :         <p>
            :           If some rows cannot be deleted because their
            :           some primary key columns are not found, due to their being deleted
            :           by a concurrent <codeph>DELETE</codeph> operation,
            :           the statement succeeds but returns a warning.
            :         </p>
            :       </li>
            :       <l
> these could be combined I think and made more clear, e.g.
Done


PS4, Line 108:           or <codeph>UPSERT</codeph> statements running concurrently on the same table.
> This is not true, we show it in the shell and in the profile (not *DBC/HS2)
Ah I was seeing "zero rows" in a downlevel impala-shell.


PS4, Line 140: -- delete 0 or 1 rows.)
             : DELETE FROM kudu_table WHERE c1 = 100;
> maybe worth mentioning this one would be fastest assuming year, month, day 
Let's save that for when we beef up the "Impala + Kudu Performance" section. Always risky to get too much into performance in these syntax sections.


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

PS4, Line 62:       The conditions in the <codeph>WHERE</codeph> clause are the same ones allowed
            :       for the <codeph>SELECT</codeph> statement.
> same comment as in delete case about predicates on PKs will be faster.
Done


PS4, Line 77: 
            :     <p>
            :       Because Kudu currently does not enforce strong consistency during concurrent DML operations,
            :       be aware that the results after this statement finishes might be different than you
            :       intuitively expect:
            :     </p>
            :     <ul>
            :       <li>
            :         <p>
> same comment about combining these as in DELETE
Done


PS4, Line 85: 
> this should be updated
Done


http://gerrit.cloudera.org:8080/#/c/5646/4/docs/topics/impala_upsert.xml
File docs/topics/impala_upsert.xml:

PS4, Line 41: <indexterm audience="hidden">UPSERT statement</indexterm>
            :       Acts as a combination of the <codeph>INSERT</codeph>
            :       and <codeph>UPDATE</codeph> statements.
> not sure if we should state this in docs
It is pretty well-known for people familiar with UPSERT (i.e. implied by the name), and for people who don't know it's a useful bit of conceptual info. I'll leave it in.


PS4, Line 78: 
> this ends up formatted oddly in the pdf, maybe next line or out of the code
Done


-- 
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: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

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


Patch Set 4:

(17 comments)

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

PS3, Line 89: There
the


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

PS4, Line 79:     <p>
            :       The conditions in the <codeph>WHERE</codeph> clause can refer to
            :       any combination of primary key columns or other columns.
            :     </p>
maybe worth mentioning that predicates on the PK will be faster- this still has a scan in it, so we push some predicates to the scan (that's described somewhere else)


PS4, Line 89: There
The


PS4, Line 88: 
            :       There <codeph>WHERE</codeph> clause can refer to any combination of columns,
            :       regardless of whether the columns are part of the primary key.
seems to duplicate the stmt 2 above


PS4, Line 93:     <p>
            :       If some rows cannot be deleted because their
            :       some primary key columns are not found, due to their being deleted
            :       by a concurrent <codeph>DELETE</codeph> operation,
            :       the statement succeeds but returns a warning.
            :     </p>
            : 
            :     <p>
            :       After the statement finishes, there might be more or fewer rows than expected in the table,
            :       due to other <codeph>INSERT</codeph>, <codeph>DELETE</codeph>, <codeph>UPDATE</codeph>,
            :       or <codeph>UPSERT</codeph> statements running concurrently on the same table.
            :     </p>
these could be combined I think and made more clear, e.g.

Because DML statements may conflict with one another (ref consistency?), a DELETE statement may attempt to delete rows that have already been deleted in which case the statement succeeds but a warning is returned. A DELETE statement may also conflict with an INSERT statement resulting in more rows than expected in the target table.


PS4, Line 108:       No message or return value indicates how many rows were deleted by the statement.
This is not true, we show it in the shell and in the profile (not *DBC/HS2).


Query: select * from t
Query submitted at: 2017-01-25 11:09:23 (Coordinator: http://mj-desktop.ca.cloudera.com:25000)
Query progress can be monitored at: http://mj-desktop.ca.cloudera.com:25000/query_plan?query_id=c410195daa4fa5e:aa39998900000000
+----+---------+
| id | int_col |
+----+---------+
| 1  | 1       |
| 5  | 1       |
| 6  | 0       |
| 7  | 1       |
| 0  | 0       |
| 2  | 0       |
| 4  | 0       |
| 3  | 1       |
+----+---------+
Fetched 8 row(s) in 5.56s
[localhost:21000] > delete t where id < 3;
Query: delete t where id < 3
Query submitted at: 2017-01-25 11:11:04 (Coordinator: http://mj-desktop.ca.cloudera.com:25000)
Query progress can be monitored at: http://mj-desktop.ca.cloudera.com:25000/query_plan?query_id=5b47f095b366a4ac:c972171800000000
Modified 3 row(s), 0 row error(s) in 0.13s


PS4, Line 140: DELETE FROM time_series WHERE
             :   year = 2016 AND month IN (11,12) AND day > 15;
maybe worth mentioning this one would be fastest assuming year, month, day are PK. in the above examples we cannot push anything with "OR" to the scan.


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

PS4, Line 62:       The conditions in the <codeph>WHERE</codeph> clause are the same ones allowed
            :       for the <codeph>SELECT</codeph> statement.
same comment as in delete case about predicates on PKs will be faster.


PS4, Line 77: their
            :       some
the


PS4, Line 77:  If some rows cannot be updated because their
            :       some primary key columns are not found, due to their being deleted
            :       by a concurrent <codeph>DELETE</codeph> operation,
            :       the statement succeeds but returns a warning.
            :     </p>
            : 
            :     <p>
            :       The result set of this statement is always the empty set (zero rows).
            :       No message or return value indicates how many rows were deleted by the statement.
same comment about combining these as in DELETE


PS4, Line 84:       The result set of this statement is always the empty set (zero rows).
            :       No message or return value indicates how many rows were deleted by the statement.
same as delete this should return a message in the shell but not *DBC/HS2. it is in the profile too. it holds for all DML.


PS4, Line 85: deleted
this should be updated


PS4, Line 98: <p conref="../shared/impala_common.xml#common/sync_ddl_blurb"/>
as we discussed in the mtg this probably doesn't apply to DML (please update the other DML stmts as well)


PS4, Line 144: but more efficient.
note this is still not pushed down


http://gerrit.cloudera.org:8080/#/c/5646/4/docs/topics/impala_upsert.xml
File docs/topics/impala_upsert.xml:

PS4, Line 41: <indexterm audience="hidden">UPSERT statement</indexterm>
            :       Acts as a combination of the <codeph>INSERT</codeph>
            :       and <codeph>UPDATE</codeph> statements.
not sure if we should state this in docs


PS4, Line 78: (Note: the square brackets are part of the syntax.)
this ends up formatted oddly in the pdf, maybe next line or out of the code block


PS4, Line 104:     <p conref="../shared/impala_common.xml#common/sync_ddl_blurb"/>
same as other stmts


-- 
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: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has uploaded a new patch set (#2).

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

Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Add 2nd syntax form and examples for DELETE.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 267 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/5646/2
-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

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


Patch Set 5: Code-Review+2

(2 comments)

Please just address my comment about arbitrary, otherwise looks good- thanks!

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

PS5, Line 42: arbitrary 
this makes it sound like it's random. how about 'a number of rows' or 'one or more' rows?


http://gerrit.cloudera.org:8080/#/c/5646/4/docs/topics/impala_upsert.xml
File docs/topics/impala_upsert.xml:

PS4, Line 41: <indexterm audience="hidden">UPSERT statement</indexterm>
            :       Acts as a combination of the <codeph>INSERT</codeph>
            :       and <codeph>UPDATE</codeph> statements.
> It is pretty well-known for people familiar with UPSERT (i.e. implied by th
It's just kind of ambiguous as to what that means. Anyway I don't feel that strongly.


-- 
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: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has uploaded a new patch set (#4).

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

Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Add 2nd syntax form and examples for DELETE.

Add join syntax to UPDATE.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 300 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/5646/4
-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has posted comments on this change.

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


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/5646/4/docs/topics/impala_upsert.xml
File docs/topics/impala_upsert.xml:

PS4, Line 41: <indexterm audience="hidden">UPSERT statement</indexterm>
            :       Acts as a combination of the <codeph>INSERT</codeph>
            :       and <codeph>UPDATE</codeph> statements.
> It's just kind of ambiguous as to what that means. Anyway I don't feel that
Done


PS4, Line 104:     <p conref="../shared/impala_common.xml#common/sync_ddl_blurb"/>
> same as other stmts
Done


-- 
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: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

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


Patch Set 5:

Build started: http://jenkins.impala.io:8080/job/gerrit-docs-submit/27/

-- 
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: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has posted comments on this change.

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


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5646/1//COMMIT_MSG
Commit Message:

PS1, Line 7: Updates to DML statements for Impala + Kudu
FYI: I posted this PDF:

http://impala-pdf.s3.amazonaws.com/impala-kudu.pdf

with all the info from this code review + the separate code review for the main Kudu page + DDL changes.


-- 
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 <jr...@cloudera.com>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has uploaded a new patch set (#3).

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

Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Add 2nd syntax form and examples for DELETE.

Add join syntax to UPDATE.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 300 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/5646/3
-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged.

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


Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Add 2nd syntax form and examples for DELETE.

Add join syntax to UPDATE.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Reviewed-on: http://gerrit.cloudera.org:8080/5646
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 335 insertions(+), 54 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Matthew Jacobs: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell has uploaded a new patch set (#5).

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

Updates to DML statements for Impala + Kudu

Fill in syntax, usage notes, examples for
UPDATE, DELETE, UPSERT. Take out IGNORE from
INSERT.

Add 2nd syntax form and examples for DELETE.

Add join syntax to UPDATE.

Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
---
M docs/shared/impala_common.xml
M docs/topics/impala_delete.xml
M docs/topics/impala_insert.xml
M docs/topics/impala_update.xml
M docs/topics/impala_upsert.xml
5 files changed, 335 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/46/5646/5
-- 
To view, visit http://gerrit.cloudera.org:8080/5646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I60512b7957fb53d86d3123a4f1d46fbb355f4665
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[Impala-ASF-CR] Updates to DML statements for Impala + Kudu

Posted by "John Russell (Code Review)" <ge...@cloudera.org>.
John Russell 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:
Done


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)
Done


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:
Done


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
Example of the syntax? I get errors trying to put the join clause in different places:

update t1 join t2 on t1.x = t2.x set t1.y = true
          ^
Encountered: JOIN
Expected: SET

update t1, t2
         ^
Encountered: COMMA
Expected: SET


-- 
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 <jr...@cloudera.com>
Gerrit-Reviewer: Ambreen Kazi <am...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dt...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: John Russell <jr...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes