JingsongLi commented on code in PR #230:
URL: https://github.com/apache/flink-table-store/pull/230#discussion_r926455963


##########
docs/content/docs/engines/spark.md:
##########
@@ -88,22 +88,103 @@ OPTIONS (
 SELECT * FROM table_store.default.myTable;
 ```
 
-## DDL
+## DDL Statements
 
-`ALTER TABLE ... SET TBLPROPERTIES`
+### Create Table
 ```sql
-ALTER TABLE table_store.default.myTable SET TBLPROPERTIES (
+CREATE TABLE [IF NOT EXISTS] table_identifier 
+[ ( col_name1[:] col_type1 [ COMMENT col_comment1 ], ... ) ]
+[ COMMENT table_comment ]
+[ PARTITIONED BY ( col_name1, col_name2, ... ) ]
+[ TBLPROPERTIES ( key1=val1, key2=val2, ... ) ]       
+```
+For example, create an order table with `order_id` as primary key and 
partitioned by `dt, hh`.
+```sql
+CREATE TABLE table_store.default.OrderTable (
+    order_id BIGINT NOT NULL comment 'biz order id',
+    buyer_id BIGINT NOT NULL COMMENT 'buyer id',
+    coupon_info ARRAY<STRING> NOT NULL COMMENT 'coupon info',
+    order_amount DOUBLE NOT NULL COMMENT 'order amount',
+    dt STRING NOT NULL COMMENT 'yyyy-MM-dd',
+    hh STRING NOT NULL COMMENT 'HH'
+) COMMENT 'my table'
+PARTITIONED BY (dt, hh)
+TBLPROPERTIES ('foo' = 'bar', 'primary-key' = 'order_id, dt, hh')

Review Comment:
   It is better to use safe format: `order_id, dt, hh` -> `order_id,dt,hh`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to