DarvenDuan opened a new pull request, #37985:
URL: https://github.com/apache/doris/pull/37985

   ## Proposed changes
   
   Bug description:
   In PR https://github.com/apache/doris/pull/33630, Doris supports auto 
aggregation for random distributed table, but it not only effects query 
statements, so if we delete from a random distributed table, will get an error 
because of unexpectedly rewriting.
   ```
   CREATE TABLE `test_tbl` (
     `k` INT NULL,
     `v` BIGINT SUM NULL
   ) ENGINE=OLAP
   AGGREGATE KEY(`k`)
   DISTRIBUTED BY RANDOM BUCKETS AUTO;
   
   mysql > delete from test_tbl where k=1;
   ERROR 1105 (HY000): errCode = 2, detailMessage = Where clause only supports 
compound predicate, binary predicate, is_null predicate or in predicate.
   ```
   
   fix:
   Check whether it is a query statement before rewriting.
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to