You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by liuyu000 <gi...@git.apache.org> on 2018/03/01 02:57:25 UTC

[GitHub] trafodion pull request #1455: [TRAFODION-2971] Add examples for *CREATE EXTE...

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

    https://github.com/apache/trafodion/pull/1455#discussion_r171451914
  
    --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc ---
    @@ -3499,6 +3499,152 @@ CREATE TABLE t1 (c1 int not null primary key, c2 char(50));
     CREATE TABLE t2 (c1 int, c2 char (50) UPSHIFT NOT NULL) AS SELECT * FROM t1;
     ```
     
    +<<<
    +[[create_external_table_examples]]
    +==== Examples of CREATE EXTERNAL TABLE
    +* This example compares the execution time of using external table and not using external table when reading hive tables.
    +
    +** This is the definition of the table _customer_address1_ which has a trafodion external table.
    ++
    +```
    +/* Hive DDL */
    +
    +CREATE TABLE HIVE.TPCDS_SF1000_ORC.customer_address1
    +  (
    +    CA_ADDRESS_SK                    int
    +  , CA_ADDRESS_ID                    string
    +  , CA_STREET_NUMBER                 string
    +  , CA_STREET_NAME                   string
    +  , CA_STREET_TYPE                   string
    +  , CA_SUITE_NUMBER                  string
    +  , CA_CITY                          string
    +  , CA_COUNTY                        string
    +  , CA_STATE                         string
    +  , CA_ZIP                           string
    +  , CA_COUNTRY                       string
    +  , CA_GMT_OFFSET                    float
    +  , CA_LOCATION_TYPE                 string
    +  )
    +  stored as orc
    --- End diff --
    
    Thanks for your explainations! 
    I’ll close this pull request and add another example (not ORC) showing that the performance of trafodion external table is better. :)


---