You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/10/23 13:15:59 UTC

[GitHub] [incubator-doris] mmuru opened a new issue #4782: Does Doris support update table?

mmuru opened a new issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782


   I am testing Doris features from the master branch. I do see DML/DDL for table but failed to see update table data. If it is supported, please can someone point me the documentation or how does it works? I do see the broker load supports merge option. 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] mmuru commented on issue #4782: Does Doris support update table?

Posted by GitBox <gi...@apache.org>.
mmuru commented on issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782#issuecomment-716927426


   @imay: Thanks. The uniq-model documentation had a syntax error in unique key('user_id', 'username'). However, like Apache Impala supports update table statement hence I would expect Apache Doris should support update statement which is the basic feature in any SQL database. 
   
   Currently, performing update on any table model (aggregate, unique or duplicate) throws the exception. 
   
   `2020-10-06 17:41:09,617 WARN (doris-mysql-nio-pool-82|684) [ConnectProcessor.analyze():243] origin_stmt: update table1 set username='muru' where siteid=5; Analyze error message: Syntax error in line 1:
   update table1 set username='muru' where siteid=5
   ^
   Encountered: IDENTIFIER
   Expected
   org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Syntax error
           at org.apache.doris.analysis.SqlParser.unrecovered_syntax_error(SqlParser.java:1749) ~[palo-fe.jar:3.4.0]
           at java_cup.runtime.lr_parser.parse(lr_parser.java:616) ~[jflex-1.4.3.jar:?]
           at org.apache.doris.common.util.SqlParserUtils.getMultiStmts(SqlParserUtils.java:50) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.ConnectProcessor.analyze(ConnectProcessor.java:239) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:183) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:325) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:510) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50) ~[palo-fe.jar:3.4.0]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_262]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_262]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]
   ` 
   I am going to submit a request to add update table support. 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] cha1Yi commented on issue #4782: Does Doris support update table?

Posted by GitBox <gi...@apache.org>.
cha1Yi commented on issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782#issuecomment-846688202






-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay commented on issue #4782: Does Doris support update table?

Posted by GitBox <gi...@apache.org>.
imay commented on issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782#issuecomment-716936716


   > The uniq-model documentation had a syntax error in unique key('user_id', 'username')
   
   If you want to change username, you should create a table like 
   
   ```
   CREATE TABLE `test_unique` (
       user_id int,
       username varchar(64)
   ) ENGINE=OLAP
   UNIQUE KEY(`user_id`)
   DISTRIBUTED BY HASH(`user_id`) BUCKETS 1
   PROPERTIES (
   "replication_num" = "1"
   );
   ```
   insert one row by "insert into test_unique values (1, "hello");"
   
   Then you can change 'username' by insert a new row to overwrite the old one, such as "insert into test_unique values (1, "world");"
   Then the user name is changed to "world"
   
   > I am going to submit a request to add update table support.
   
   I think supporing update is complicated operation. Can you give us some detail about your change?
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] cha1Yi removed a comment on issue #4782: Does Doris support update table?

Posted by GitBox <gi...@apache.org>.
cha1Yi removed a comment on issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782#issuecomment-846688228


   As you say,when I insert a new row ,where my old row ? disapper in disk or logic delete it?


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay commented on issue #4782: Does Doris support update table?

Posted by GitBox <gi...@apache.org>.
imay commented on issue #4782:
URL: https://github.com/apache/incubator-doris/issues/4782#issuecomment-716912651


   You can create table with `unique key` to support upsert operation.
   You can reference http://doris.apache.org/master/en/getting-started/data-model-rollup.html#uniq-model 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org