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/02/27 11:59:31 UTC

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

GitHub user liuyu000 opened a pull request:

    https://github.com/apache/trafodion/pull/1455

    [TRAFODION-2971] Add examples for *CREATE EXTERNAL TABLE Statement* in *Trafodion SQL Reference Manual*

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/liuyu000/trafodion CreateExternalTableStatement

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1455.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1455
    
----
commit 5a7659dc6abeae197948596e63ff4170c5052dae
Author: liu.yu <yu...@...>
Date:   2018-02-27T10:30:59Z

    Add examples for *CREATE EXTERNAL TABLE Statement* in *Trafodion SQL Reference Manual*

----


---

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

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1455#discussion_r171032164
  
    --- 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 --
    
    My understanding is that the support in Trafodion for Hive ORC files is incomplete and at best experimental at this point. I'm not sure we should use ORC in our examples until the feature is product quality.


---

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

Posted by liuyu000 <gi...@git.apache.org>.
Github user liuyu000 closed the pull request at:

    https://github.com/apache/trafodion/pull/1455


---

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

Posted by liuyu000 <gi...@git.apache.org>.
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. :)


---