You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2018/05/24 15:28:55 UTC

[1/4] trafodion git commit: Add *populate-option* for *CREATE INDEX Statement* and fix typos in *Trafodion SQL Reference Manual*

Repository: trafodion
Updated Branches:
  refs/heads/master f92887964 -> b04bfda91


Add *populate-option* for *CREATE INDEX Statement* and fix typos in *Trafodion SQL Reference Manual*


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/7d0ffe8e
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/7d0ffe8e
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/7d0ffe8e

Branch: refs/heads/master
Commit: 7d0ffe8e7c42c0dc4a60cd6354c5cbee28524754
Parents: 397fd2d
Author: liu.yu <qw...@hotmail.com>
Authored: Wed May 23 16:41:10 2018 +0800
Committer: liu.yu <qw...@hotmail.com>
Committed: Wed May 23 16:41:10 2018 +0800

----------------------------------------------------------------------
 .../src/asciidoc/_chapters/sql_statements.adoc  | 32 ++++++++++++++++++--
 .../src/asciidoc/_chapters/sql_utilities.adoc   |  2 +-
 2 files changed, 30 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/7d0ffe8e/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
index 5a76ffb..2fe09e8 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
@@ -1707,9 +1707,10 @@ inside a user-defined transaction (BEGIN WORK&#8230;COMMIT WORK) or when AUTOCOM
 AUTOCOMMIT must be turned ON (the default) for the session.
 
 ```
-CREATE [VOLATILE | UNIQUE] INDEX index ON table
+CREATE [VOLATILE | UNIQUE] INDEX index-name ON table
    (column-name [ASC[ENDING] | DESC[ENDING]]
    [,column-name [ASC[ENDING] | DESC[ENDING]]]...)
+   [populate-option]
    [HBASE_OPTIONS (hbase-options-list)]
    [SALT LIKE TABLE]
 
@@ -1733,7 +1734,7 @@ Unique index not only improves the query performance, but also provides data int
 +
 NOTE: Multiple NULL values are treated as duplicate values for a column which can contain only one NULL value.
 
-* `_index_`
+* `_index-name_`
 +
 is an SQL identifier that specifies the simple name for the new index. You cannot qualify _index_ with its schema
 name. Indexes have their own name space within a schema, so an index name might be the same as a table or constraint
@@ -1755,6 +1756,23 @@ for the first column, the values in the second column are used to order the rows
 rows occur in a non-unique index, their order is based on the sequence specified for the columns of the key of the
 underlying table. For ordering (but not for other purposes), nulls are greater than other values.
 
+* `populate-option`
+
+** `NO POPULATE`
++
+specifies that the index is not to be populated when it is created. 
++
+The index’s partition(s) are created, but no data is written to the index, and it is marked “offline”. You can drop an offline index with the DROP INDEX statement. 
+The DROP TABLE statement also drops offline indexes of the specified table. 
+DML statements have no effect on offline indexes. 
++
+If an index is created with the intention of using it for a constraint, it must be populated before creating the constraint. 
+You can populate an offline index and remove its offline designation by using the POPULATE INDEX utility.
+
+** `POPULATE`
++
+specifies that the index is to be created and populated. 
+
 * `HBASE_OPTIONS (_hbase-option_ = '_value_'[, _hbase-option_ = '_value_']&#8230;)`
 +
 a list of HBase options to set for the index. These options are applied independently of any HBase options set for
@@ -1936,6 +1954,14 @@ SQL>create unique index idx_t25 on t25(b);
 *** ERROR[1053] Unique index TRAFODION.SEABASE.IDX_T25 could not be created because the specified column(s) contain duplicate data. [2017-01-12 17:17:51]
 ```
 
+* This exmaple creates the index _index_test_ which is not to be populated on the column _c1_ of the table _test_.
++
+```
+SQL>create index index_test on test (c1) no populate;
+
+--- SQL operation complete.
+```
+
 <<<
 [[create_library_statement]]
 == CREATE LIBRARY Statement
@@ -1972,7 +1998,7 @@ and <<database_object_names,database object names>>.
 +
 specifies the full path of a deployed library file, which either an SPJ's jar file or a UDF's library file.
 +
-note: make sure to upload the library file to the trafodion cluster and then copy the library file to the
+NOTE: Make sure to upload the library file to the trafodion cluster and then copy the library file to the
 same directory on all the nodes in the cluster before running the create library statement. otherwise, you
 will see an error message indicating that the jar or dll file was not found.
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/7d0ffe8e/docs/sql_reference/src/asciidoc/_chapters/sql_utilities.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_utilities.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_utilities.adoc
index 992b955..5bcde53 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_utilities.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_utilities.adoc
@@ -2141,7 +2141,7 @@ directs {project-name} SQL to create a persistent sample table and store the
 random sample in it. This table can then be used later for updating statistics
 incrementally.
 
-**** `PERIODIC _size_ ROWS EVERY _period_ ROW`
+**** `PERIODIC _size_ ROWS EVERY _period_ ROWS`
 +
 directs {project-name} SQL to choose the first _size_ number of rows from
 each _period_ of rows. The value _size_ must be an integer that is


[2/4] trafodion git commit: Add Syntax

Posted by db...@apache.org.
Add Syntax


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/a4bbb764
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/a4bbb764
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/a4bbb764

Branch: refs/heads/master
Commit: a4bbb764f949784c766a4b5645bd3631b67c3631
Parents: 7d0ffe8
Author: liu.yu <qw...@hotmail.com>
Authored: Wed May 23 17:07:04 2018 +0800
Committer: liu.yu <qw...@hotmail.com>
Committed: Wed May 23 17:07:04 2018 +0800

----------------------------------------------------------------------
 docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/a4bbb764/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
index 2fe09e8..5250c11 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
@@ -1714,6 +1714,10 @@ CREATE [VOLATILE | UNIQUE] INDEX index-name ON table
    [HBASE_OPTIONS (hbase-options-list)]
    [SALT LIKE TABLE]
 
+populate-option is:
+  POPULATE
+| NO POPULATE
+
 hbase-options-list is:
    hbase-option = 'value'[, hbase-option = 'value']...
 ```


[3/4] trafodion git commit: Incorporate Comments 1

Posted by db...@apache.org.
Incorporate Comments 1


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/b7c6844e
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/b7c6844e
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/b7c6844e

Branch: refs/heads/master
Commit: b7c6844e8b5e181e20565c5d58de7606664418db
Parents: a4bbb76
Author: liu.yu <qw...@hotmail.com>
Authored: Thu May 24 14:40:36 2018 +0800
Committer: liu.yu <qw...@hotmail.com>
Committed: Thu May 24 14:40:36 2018 +0800

----------------------------------------------------------------------
 docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/b7c6844e/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
index 5250c11..26c2240 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
@@ -1776,6 +1776,8 @@ You can populate an offline index and remove its offline designation by using th
 ** `POPULATE`
 +
 specifies that the index is to be created and populated. 
++
+The default is `POPULATE`.
 
 * `HBASE_OPTIONS (_hbase-option_ = '_value_'[, _hbase-option_ = '_value_']&#8230;)`
 +


[4/4] trafodion git commit: Merge [TRAFODION-3082] PR 1575 Add POPULATE option for CREATE INDEX to pubs

Posted by db...@apache.org.
Merge [TRAFODION-3082] PR 1575 Add POPULATE option for CREATE INDEX to pubs


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/b04bfda9
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/b04bfda9
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/b04bfda9

Branch: refs/heads/master
Commit: b04bfda915ebee1b067c39d70a3d187e77e06f16
Parents: f928879 b7c6844
Author: Dave Birdsall <db...@apache.org>
Authored: Thu May 24 15:28:00 2018 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu May 24 15:28:00 2018 +0000

----------------------------------------------------------------------
 .../src/asciidoc/_chapters/sql_statements.adoc  | 38 ++++++++++++++++++--
 .../src/asciidoc/_chapters/sql_utilities.adoc   |  2 +-
 2 files changed, 36 insertions(+), 4 deletions(-)
----------------------------------------------------------------------