Github user liuyu000 commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1295#discussion_r151065344
  
    --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc ---
    @@ -3308,6 +3343,43 @@ SELECT * FROM T WHERE b = 'A';
     SELECT * FROM T WHERE b = 'A' (not casespecific);
     ```
     
    +* This is the 1^st^ example of DIVISION BY usage.
    ++
    +```
    +CREATE TABLE call_home_data
    +(id LARGEINT NOT NULL,
    +ts TIMESTAMP(6) NOT NULL,
    +device_status VARCHAR(200),
    +PRIMARY KEY (id, ts))
    +SALT USING 16 PARTITIONS ON (id)
    +DIVISION BY (date_trunc('day', ts));
    +```
    +
    +* This is the 2^nd^ example of DIVISION BY usage.
    ++
    +```
    +CREATE TABLE sales1
    +(store_id INT NOT NULL,
    +item_id  INT NOT NULL,
    +sale_date DATE DEFAULT DATE '2000-01-01' NOT NULL,
    +sale_amt NUMERIC(10,2),
    +PRIMARY KEY (store_id, item_id, sale_date))
    +DIVISION BY (DATEDIFF(YEAR, '2017-11-02', sale_date));
    +```
    +
    +* This is the 3^rd^ example of DIVISION BY usage.
    --- End diff --
    
    Thanks for your details.
    I've corrected. :)


---

Reply via email to