morningman commented on a change in pull request #2781: Batch Operate Rollup 
table in Doris #2671
URL: https://github.com/apache/incubator-doris/pull/2781#discussion_r376700373
 
 

 ##########
 File path: docs/documentation/cn/sql-reference/sql-statements/Data 
Definition/CREATE TABLE.md
 ##########
 @@ -550,6 +559,26 @@ under the License.
      );
 ```
 
+12. Create a table with rollup index
+```
+    CREATE TABLE example_db.rolup_index_table
+    (
+        event_day DATE,
+        siteid INT DEFAULT '10',
+        citycode SMALLINT,
+        username VARCHAR(32) DEFAULT '',
+        pv BIGINT SUM DEFAULT '0'
+    )
+    AGGREGATE KEY(event_day, siteid, citycode, username)
+    DISTRIBUTED BY HASH(siteid) BUCKETS 10
+    rollup (
+    r1(event_day,siteid),
+    r2(event_day,citycode),
+    r3(event_day) from r1
 
 Review comment:
   I saw that you agreed with @kangkaisen that user can not create rollup from 
non-exist rollup? So this example should be changed, right?
   
   `r3(event_day) from r1`

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


With regards,
Apache Git Services

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

Reply via email to