You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sv...@apache.org on 2016/01/14 19:18:07 UTC

[03/42] incubator-trafodion git commit: Rechecking of asciidoc conversion due to weird Windows10 upgrade.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/859a7e4c/docs/sql_reference/source/xml-profile.xml
----------------------------------------------------------------------
diff --git a/docs/sql_reference/source/xml-profile.xml b/docs/sql_reference/source/xml-profile.xml
deleted file mode 100755
index c421b53..0000000
--- a/docs/sql_reference/source/xml-profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-* @@@ START COPYRIGHT @@@                                                       
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
--->
-
-<!--Arbortext, Inc., 1988-2014, v.4002-->
-<!DOCTYPE xidi:xidi PUBLIC "-//Apache Software Foundation (ASF)//DTD XIDI Specifications V1.0//EN"
- "xidi-xidi.dtd">
-<xidi:xidi>
-<!--Profiling Information-->
-<xidi:conditionSet>
-<xidi:conditional refCondition="hidden" value="off"/>
-</xidi:conditionSet>
-<!--Parameters specific to PDF rendering-->
-<xidi:pdfSpec>
-<xidi:paper.type value="HPA1-8.26x11"/>
-<xidi:secondary.color value="medium.blue"/>
-<xidi:dragonParam name="variablelist.as.blocks" value="2"/>
-<xidi:toc.section.depth value="2"/>
-<!--Be sure to set document status value="final" for the final copy-->
-<xidi:document.status value="final"/>
-</xidi:pdfSpec>
-</xidi:xidi>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/859a7e4c/docs/sql_reference/src/asciidoc/_chapters/about.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/about.adoc b/docs/sql_reference/src/asciidoc/_chapters/about.adoc
new file mode 100644
index 0000000..ba91a95
--- /dev/null
+++ b/docs/sql_reference/src/asciidoc/_chapters/about.adoc
@@ -0,0 +1,178 @@
+////
+/**
+* @@@ START COPYRIGHT @@@
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+* @@@ END COPYRIGHT @@@
+  */
+////
+
+[[About_This_Document]]
+= About This Document
+This manual describes reference information about the syntax of SQL statements, functions, and other
+SQL language elements supported by the Trafodion project’s database software.
+
+Trafodion SQL statements and utilities are entered interactively or from script files using a client-based tool,
+such as the Trafodion Command Interface (TrafCI). To install and configure a client application that enables you
+to connect to and use a Trafodion database, see the
+http://trafodion.incubator.apache.org/client_install/index.html[_Trafodion Client Installation Guide_].
+
+NOTE: In this manual, SQL language elements, statements, and clauses within statements are based on the
+ANSI SQL:1999 standard.
+
+[[Intended_Audience]]
+== Intended Audience
+This manual is intended for database administrators and application programmers who are using SQL to read, update,
+and create Trafodion SQL tables, which map to HBase tables, and to access native HBase and Hive tables.
+
+You should be familiar with structured query language (SQL) and with the American National Standard Database Language SQL:1999.
+
+<<<
+[[New_and_Changed_Information]]
+== New and Changed Information
+This edition includes updates for these new features:
+
+[cols="50%,50%",options="header"]
+|===
+| New Feature                                           | Location in the Manual
+| On Line Analytical Process (OLAP) window functions    | <<OLAP_Functions,OLAP Functions>>
+| Ability to cancel DDL, update statistics, and
+additional child query operations in addition to
+DML statements                                          | <<CONTROL_QUERY_CANCEL_Statement,CONTROL QUERY CANCEL Statement>> 
+| Authorization required to run the CONTROL QUERY
+CANCEL Statement                                        | <<CONTROL_QUERY_CANCEL_Statement,CONTROL QUERY CANCEL Statement>>
+| Ability to grant privileges on behalf of a role
+using the GRANTED BY clause.                            | <<GRANT_COMPONENT_PRIVILEGE_Statement,GRANT COMPONENT PRIVILEGE Statement>>
+| Authorization required for all SHOWDDL commands       | <<SHOWDDL_Statement,SHOWDDL Statement>> +
+<<SHOWDDL_SCHEMA_Statement,SHOWDDL SCHEMA Statement>>
+| Ability to display the DDL syntax of a library object
+using the SHOWDDL LIBRARY command                       | <<SHOWDDL_Statement,SHOWDDL Statement>>
+| Listing of HBase objects using the GET HBASE OBJECTS
+command through an SQL interface                        | <<GET_HBASE_OBJECTS_Statement,GET HBASE OBJECTS Statement>>
+|===
+
+<<<
+[[Document_Organization]]
+== Document Organization
+
+[cols="50%,50%",options="header"]
+|===
+|Chapter or Appendix                                              | Description
+| <<Introduction,Introduction>>                                   | Introduces Trafodion SQL and covers topics such as data consistency,
+transaction management, and ANSI compliance.
+| <<SQL_Statements,SQL Statements>>                               | Describes the SQL statements supported by Trafodion SQL.
+| <<SQL_Utilities,SQL Utilities>>                                 | Describes the SQL utilities supported by Trafodion SQL.
+| <<SQL_Language Elements,SQL Language Elements>>                 | Describes parts of the language, such as database objects, data types,
+expressions, identifiers, literals, and predicates, which occur within the syntax of Trafodion SQL statements.
+| <<SQL_Clauses,SQL Clauses>>                                     | Describes clauses used by Trafodion SQL statements.
+| <<SQL_Functions_and_Expressions,SQL Functions and Expressions>> | Describes specific functions and expressions that you can use in
+Trafodion SQL statements.
+| <<SQL_Runtime_Statistics,SQL Runtime Statistics>>               | Describes how to gather statistics for active queries or for the Runtime
+Management System (RMS) and describes the RMS counters that are returned.
+| <<OLAP_Functions,OLAP Functions>>                               | Describes specific on line analytical processing functions.
+| <<Reserved_Words,Appendix A: Reserved Words>>                   | Lists the words that are reserved in Trafodion SQL.
+| <<Control_Query_Default,Appendix B: Control Query Default (CQD) Attributes>> |
+Describes the Control Query Default (CQD) attributes that are supported in a Trafodion SQL environment.
+| <<Limits,Appendix C: Limits>>                                  | Describes limits in Trafodion SQL.
+|===
+
+
+<<<
+== Notation Conventions
+This list summarizes the notation conventions for syntax presentation in this manual.
+
+[cols="15%,30%,25%,30%",options="header"]
+|===
+| Notation | Usage | Example | Notes
+| UPPERCASE LETTERS | Uppercase letters indicate keywords and reserved words. Type these items exactly as shown. Items not enclosed in brackets are required. | SELECT | 
+| _Italic Letters_ | Italic letters, regardless of font, indicate variable items that you supply. Items not enclosed in brackets are required. | _file-name_ | 
+| `Computer Type` | Computer type letters within text indicate case-sensitive keywords and reserved words. Type these items exactly as shown. Items not enclosed in
+brackets are required. | `myfile.sh` | 
+| *Bold Text* | Bold text in an example indicates user input typed at the terminal. | `ENTER RUN CODE:` +
+ ?**123** +
+ `CODE RECEIVED: 123.00` | The user must press the Return key after typing the input.
+| [ ] Brackets | Brackets enclose optional syntax items. |
+DATETIME [__start-field__ TO] +
+_end-field_
+| A group of items enclosed in brackets is a list from which you can choose one item or none.
+
+The items in the list can be arranged either vertically, with aligned brackets on each side of the list, or horizontally, enclosed in a pair of brackets and separated by vertical lines.
+
+For example:
+
+`DROP SCHEMA _schema_ [CASCADE]` +
+`DROP SCHEMA _schema_ [ CASCADE \| RESTRICT ]`
+| { } Braces | Braces enclose required syntax items. | `FROM { __grantee__[, __grantee__]&#8230;}` | A group of items enclosed in braces is a list from which you are required to choose one item.
+
+The items in the list can be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines.
+
+For example:
+
+`INTERVAL { _start-field_ TO _end-field_ }` +
+`{ _single-field_ }` +
+`INTERVAL { _start-field_ TO _end-field_ \| _single-field_ }` 
+| \| Vertical Line | A vertical line separates alternatives in a horizontal list that is enclosed in brackets or braces. | `{__expression__ \| NULL}` |
+| &#8230; Ellipsis | An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. |
+`ATTRIBUTE[S] _attribute_ [, __attribute__]&#8230;` +
+`{, __sql-expression__}&#8230;`
+| An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times.
+
+For example:
+
+`__expression-n__…`
+| Punctuation | Parentheses, commas, semicolons, and other symbols not previously described must be typed as shown. |
+DAY (__datetime-expression__)` +
+`@__script-file__` | Quotation marks around a symbol such as a bracket or brace indicate the symbol is a required character that you must type as shown.
+
+For example:
+
+`"{" _module-name_ [, __module-name__]&#8230; "}"`
+| Item Spacing | Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or a comma. |
+`DAY (__datetime-expression__) DAY(__datetime-expression__)` | If there is no space between two items, spaces are not permitted. In this example, no spaces are permitted between the period and any other items:
+
+`__myfile__.sh`
+
+| Line Spacing | If the syntax of a command is too long to fit on a single line, each continuation line is indented three spaces and is separated from the preceding line by a blank line.
+
+This spacing distinguishes items in a continuation line from items in a vertical list of selections. | 
+`_match-value_ [NOT] LIKE _pattern_`
+   [ESCAPE __esc-char-expression__] |
+|===
+
+<<<
+== Publishing History
+[cols="2*",options="header"]
+|===
+| Product Version                                      | Publication Date
+| Trafodion Release 1.3.0                              | January 2016
+| Trafodion Release 1.1.0                              | April 2015
+| Trafodion Release 1.0.0                              | January 2015
+| Trafodion Release 0.9.0 Beta                         | October 2014
+| Trafodion Release 0.8.1 Beta                         | August 2014
+| Trafodion Release 0.8.0 Beta                         | June 2014
+|===
+
+== Comments Encouraged
+The Trafodion community encourages your comments concerning this document. We are committed to providing documentation that meets your
+needs. Send any errors found, suggestions for improvement, or compliments to:
+
+issues@trafodion.incubator.apache.org
+
+Include the document title and any comment, error found, or suggestion for improvement you have concerning this document.
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/859a7e4c/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc b/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
new file mode 100644
index 0000000..1120edc
--- /dev/null
+++ b/docs/sql_reference/src/asciidoc/_chapters/introduction.adoc
@@ -0,0 +1,519 @@
+////
+/**
+* @@@ START COPYRIGHT @@@
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+* @@@ END COPYRIGHT @@@
+  */
+////
+
+[[Introduction]]
+= Introduction
+
+The Trafodion SQL database software allows you to use SQL statements, which comply closely to
+ANSI SQL:1999, to access data in Trafodion SQL tables, which map to HBase tables, and to access
+native HBase tables and Hive tables.
+
+This introduction describes:
+
+* <<SQL_Language,SQL Language>>
+* <<Using_Trafodion_SQL_to_Access_HBase_Tables,Using Trafodion SQL to Access HBase Tables>>
+* <<Using_Trafodion_SQL_to_Access_Hive_Tables,Using Trafodion SQL to Access Hive Tables>>
+* <<Data_Consistency_and_Access_Options,Data Consistency and Access Options>>
+* <<Transaction_Management,Transaction Management>>
+* <<ANSI_Compliance_and_Trafodion_SQL_Extensions,ANSI Compliance and Trafodion SQL Extensions>>
+* <<Trafodion_SQL_Error_Messages,Trafodion SQL Error Messages>>
+
+Other sections of this manual describe the syntax and semantics of individual statements, commands, and language elements.
+
+[[SQL_Language]]
+== SQL Language
+
+The SQL language consists of statements and other language elements that you can use to access SQL
+databases. For descriptions of individual SQL statements, see <<"SQL_Statements","SQL Statements">>.
+
+SQL language elements are part of statements and commands and include data types, expressions, functions,
+identifiers, literals, and predicates. For more information, see:
+
+* <<SQL_Language,SQL Language>>
+* <<Elements,Elements>>
+* <<SQL_Clauses,SQL Clauses>>
+
+For information on specific functions and expressions, see:
+
+* <<SQL_Functions_and_Expressions,SQL Functions and Expressions>>
+* <<OLAP_Functions,OLAP Functions>>
+
+<<<
+[[Using_Trafodion_SQL_to_Access_HBase_Tables]]
+== Using Trafodion SQL to Access HBase Tables
+
+You can use Trafodion SQL statements to read, update, and create HBase tables.
+
+* <<Initializing_the_Trafodion_Metadata,Initializing the Trafodion Metadata>>
+* <<Ways_to_Access_HBase_Tables,Ways to Access HBase Tables>>
+* <<Trafodion_SQL_Tables_Versus_Native_HBase_Tables,Trafodion SQL Tables Versus Native HBase Tables>>
+* <<Supported_SQL_Statements_With_HBase_Tables,Supported SQL Statements With HBase Tables>>
+
+For a list of Control Query Default (CQD) settings for the HBase environment, see <<HBase_Environment_CQDs,HBase Environment CQDs>>.
+
+[[Ways_to_Access_HBase_Tables]]
+=== Ways to Access HBase Tables
+Trafodion SQL supports these ways to access HBase tables:
+
+* <<Accessing_Trafodion_SQL_Tables,Accessing Trafodion SQL Tables>>
+* <<Cell_Per_Row_Access_to_HBase_Tables,Cell-Per-Row Access to HBase Tables (Technology Preview)>>
+* <<Rowwise_Access_to_HBase_Tables,Rowwise Access to HBase Tables (Technology Preview)>>
+
+<<<
+[[Accessing_Trafodion_SQL_Tables]]
+==== Accessing Trafodion SQL Tables
+
+A Trafodion SQL table is a relational SQL table generated by a `CREATE TABLE` statement and mapped
+to an HBase table. Trafodion SQL tables have regular ANSI names in the catalog `TRAFODION`.
+A Trafodion SQL table name can be a fully qualified ANSI name of the form
+`TRAFODION._schema-name.object-name_`.
+
+To access a Trafodion SQL table, specify its ANSI table name in a Trafodion SQL statement, similar
+to how you would specify an ANSI table name when running SQL statements in a relational database.
+
+*Example*
+
+[source,sql]
+----
+CREATE TABLE trafodion.sales.odetail
+( ordernum NUMERIC (6) UNSIGNED NO DEFAULT NOT NULL
+, partnum NUMERIC (4) UNSIGNED NO DEFAULT NOT NULL
+, unit_price NUMERIC (8,2) NO DEFAULT NOT NULL
+, qty_ordered NUMERIC (5) UNSIGNED NO DEFAULT NOT NULL
+, PRIMARY KEY (ordernum, partnum)
+);
+
+INSERT INTO trafodion.sales.odetail VALUES ( 900000, 7301, 425.00, 100 );
+
+SET SCHEMA trafodion.sales;
+
+SELECT * FROM odetail;
+----
+
+For more information about Trafodion SQL tables, see
+<<Trafodion_SQL_Tables_Versus_Native_HBase_Tables,Trafodion SQL Tables Versus Native HBase Tables>>.
+
+<<<
+[[cell_per_row_access_to_hbase_tables]]
+==== Cell-Per-Row Access to HBase Tables (Technology Preview)
+
+NOTE: This is a _Technology Preview (Complete But Not Tested)_ feature, meaning that it is functionally
+complete but has not been tested or debugged. 
+
+To access HBase data using cell-per-row mode, specify the schema `HBASE."_CELL_"` and the full ANSI
+name of the table as a delimited table name. You can specify the name of any HBase table, regardless of whether
+it was created through Trafodion SQL.
+
+*Example*
+
+[source,sql]
+----
+select * from hbase."_CELL_"."TRAFODION.MYSCH.MYTAB";
+select * from hbase."_CELL_"."table_created_in_HBase";
+----
+
+All tables accessed through this schema have the same column layout:
+
+[source,sql]
+----
+>>invoke hbase."_CELL_"."table_created_in_HBase";
+  (
+  ROW_ID        VARCHAR(100)    ...
+, COL_FAMILY    VARCHAR(100)    ...
+, COL_NAME      VARCHAR(100)    ...
+, COL_TIMESTAMP LARGEINT        ...
+, COL_VALUE     VARCHAR(1000) ...
+)
+PRIMARY KEY (ROW_ID)
+
+>>select * from hbase."_CELL_"."mytab";
+----
+
+<<<
+[[rowwise_access_to_hbase_tables]]
+==== Rowwise Access to HBase Tables (Technology Preview)
+
+NOTE: This is a _Technology Preview (Complete But Not Tested)_ feature, meaning that it is functionally
+complete but has not been tested or debugged.
+
+To access HBase data using rowwise mode, specify the schema `HBASE."_ROW_"` and the full ANSI name of the
+table as a delimited table name. You can specify the name of any HBase table, regardless of whether
+it was created through Trafodion SQL.
+
+*Example*
+
+[source,sql]
+----
+select * from hbase."_ROW_"."TRAFODION.MYSCH.MYTAB";
+select * from hbase."_ROW_"."table_created_in_HBase";
+----
+
+All column values of the row are returned as a single, big varchar:
+
+[source,sql]
+----
+>>invoke hbase."_ROW_"."mytab";
+(
+  ROW_ID VARCHAR(100) ...
+, COLUMN_DETAILS VARCHAR(10000) ...
+)
+PRIMARY KEY (ROW_ID)
+
+>>select * from hbase."_ROW_"."mytab";
+----
+
+<<<
+[[Trafodion_SQL_Tables_Versus_Native_HBase_Tables]]
+=== Trafodion SQL Tables Versus Native HBase Tables
+
+Trafodion SQL tables have many advantages over regular HBase tables:
+
+* They can be made to look like regular, structured SQL tables with fixed columns.
+* They support the usual SQL data types supported in relational databases.
+* They support compound keys, unlike HBase tables that have a single row key (a string).
+* They support indexes.
+* They support _salting_, which is a technique of adding a hash value of the row key as a
+key prefix to avoid hot spots for sequential keys. For the syntax,
+see the <<CREATE_TABLE_Statement,CREATE TABLE Statement>>.
+
+The problem with Trafodion SQL tables is that they use a fixed format to represent column values,
+making it harder for native HBase applications to access them. Also, they have a fixed structure,
+so users lose the flexibility of dynamic columns that comes with HBase.
+
+[[Supported_SQL_Statements_With_HBase_Tables]]
+=== Supported SQL Statements With HBase Tables
+
+You can use these SQL statements with HBase tables:
+
+|===
+| <<SELECT_Statement,SELECT Statement>>             | <<INSERT_Statement,INSERT Statement>>
+| <<UPDATE_Statement,UPDATE Statement>>             | <<DELETE_Statement,DELETE Statement>>
+| <<MERGE_Statement,MERGE Statement>>               | <<GET_Statement,GET Statement>>
+| <<INVOKE_Statement,INVOKE Statement>>             | <<ALTER_TABLE_Statement,ALTER TABLE Statement>>
+| <<CREATE_INDEX_Statement,CREATE INDEX Statement>> | <<CREATE_TABLE_Statement,CREATE TABLE Statement>>
+| <<CREATE_VIEW_Statement,CREATE VIEW Statement>>   | <<DROP_INDEX_Statement,DROP INDEX Statement>>
+| <<DROP_TABLE_Statement,DROP TABLE Statement>>     | <<DROP_VIEW_Statement,DROP VIEW Statement>>
+| <<GRANT_Statement,GRANT Statement>>               | <<REVOKE_Statement,REVOKE Statement>>
+|===
+
+<<<
+[[Using_Trafodion_SQL_to_Access_Hive_Tables]]
+== Using Trafodion SQL to Access Hive Tables
+
+You can use Trafodion SQL statements to access Hive tables.
+
+* <<ANSI_Names_for_Hive_Tables,ANSI Names for Hive Tables>>
+* <<Type_Mapping_From_Hive_to_Trafodion_SQL,Type Mapping From Hive to Trafodion SQL>>
+* <<Supported_SQL_Statements_With_Hive_Tables,Supported SQL Statements With Hive Tables>>
+
+For a list of Control Query Default (CQD) settings for the Hive environment, see <<Hive_Environment_CQDs,Hive Environment CQDs>>.
+
+[[ANSI_Names_for_Hive_Tables]]
+=== ANSI Names for Hive Tables
+
+Hive tables appear in the Trafodion Hive ANSI namespace in a special catalog and schema named `HIVE.HIVE`.
+
+To select from a Hive table named `T`, specify an implicit or explicit name, such as `HIVE.HIVE.T`,
+in a Trafodion SQL statement.
+
+*Example*
+This example should work if a Hive table named `T` has already been defined:
+
+[source,sql]
+----
+set schema hive.hive;
+
+cqd hive_max_string_length '20'; -- creates a more readable display
+select * from t; -- implicit table name
+
+set schema trafodion.seabase;
+
+select * from hive.hive.t; -- explicit table name
+----
+
+
+<<<
+[[Type_Mapping_From_Hive_to_Trafodion_SQL]]
+=== Type Mapping From Hive to Trafodion SQL
+
+Trafodion performs the following data-type mappings:
+
+[cols="2*",options="header"]
+|===
+| Hive Type             | Trafodion SQL Type
+| `tinyint`             | `smallint`
+| `smallint`            | `smallint`
+| `int`                 | `int`
+| `bigint`              | `largeint`
+| `string`              | `varchar(_n_ bytes) character set utf8`^1^
+| `float`               | `real`
+| `double`              | `float(54)`
+| `timestamp`           | `timestamp(6)`^2^
+|===
+
+1. The value `_n_` is determined by `CQD HIVE_MAX_STRING_LENGTH`. See <<Hive_Environment_CQDs,Hive Environment CQDs>>.
+2. Hive supports timestamps with nanosecond resolution (precision of 9). Tafodion SQL supports only microsecond resolution (precision 6).
+
+[[Supported_SQL_Statements_With_Hive_Tables]]
+=== Supported SQL Statements With Hive Tables
+
+You can use these SQL statements with Hive tables:
+
+* <<SELECT_Statement,SELECT Statement>>
+* <<LOAD_Statement,LOAD Statement>>
+* GET TABLES (See the <<GET_Statement,GET Statement>>.)
+* <<INVOKE_Statement,INVOKE Statement>>
+
+<<<
+[[Data_Consistency_and_Access_Options]]
+== Data Consistency and Access Options
+
+Access options for DML statements affect the consistency of the data that your query accesses.
+
+For any DML statement, you specify access options by using the `FOR _option_ ACCESS` clause and,
+for a `SELECT` statement, by using this same clause, you can also specify access options for individual
+tables and views referenced in the FROM clause.
+
+The possible settings for `_option_` in a DML statement are:
+
+* <<READ_COMMITTED,READ COMMITTED>>
+
+Specifies that the data accessed by the DML statement must be from committed rows.
+
+The SQL default access option for DML statements is `READ COMMITTED`.
+
+For related information about transactions, see
+<<Transaction_Isolation_Levels,Transaction Isolation Levels>>.
+
+[[READ_COMMITTED]]
+=== READ COMMITTED
+
+This option allows you to access only committed data.
+
+The implementation requires that a lock can be acquired on the data requested by the DML statement—but
+does not actually lock the data, thereby reducing lock request conflicts. If a lock cannot be granted
+(implying that the row contains uncommitted data), the DML statement request waits until the lock in
+place is released.
+
+READ COMMITTED provides the next higher level of data consistency (compared to READ UNCOMMITTED).
+A statement executing with this access option does not allow dirty reads, but both nonrepeatable reads
+and phantoms are possible.
+
+READ COMMITTED provides sufficient consistency for any process that does not require a repeatable read
+capability.
+
+READ COMMITTED is the default isolation level.
+
+<<<
+[[Transaction_Management]]
+== Transaction Management
+
+A transaction (a set of database changes that must be completed as a group) is the basic recoverable unit
+in case of a failure or transaction interruption. Transactions are controlled through client tools that
+interact with the database using ODBC or JDBC.
+
+The typical order of events is:
+
+1.  Transaction is started.
+2.  Database changes are made.
+3.  Transaction is committed.
+
+If, however, the changes cannot be made or if you do not want to complete the transaction, then you can abort
+the transaction so that the database is rolled back to its original state.
+
+This subsection discusses these considerations for transaction management:
+
+* <<User_Defined_and_System_Defined_Transactions,User-Defined and System-Defined Transactions>>
+* <<Rules_for_DML_Statements,Rules for DML Statements>>
+* <<Effect_of_AUTOCOMMIT_Option,Effect of AUTOCOMMIT Option>>
+* <<Concurrency,Concurrency>>
+* <<Transaction_Isolation_Levels,Transaction Isolation Levels>>
+
+[[User_Defined_and_System_Defined_Transactions]]
+=== User-Defined and System-Defined Transactions
+Transactions you define are called _user-defined transactions_. To be sure that a sequence of statements executes
+successfully or not at all, you can define one transaction consisting of these statements by using the BEGIN WORK
+statement and COMMIT WORK statement. You can abort a transaction by using the ROLLBACK WORK statement.
+
+If AUTOCOMMIT is on, then you do not have to end the transaction explicitly as Trafodion SQL will end the transaction
+automatically. Sometimes an error occurs that requires the user-defined transaction to be aborted. Trafodion SQL
+will automatically abort the transaction and return an error indicating that the transaction was rolled back.
+
+[[system_defined_transactions]]
+==== System-Defined Transactions
+
+In some cases, Trafodion SQL defines transactions for you. These transactions are called _system-defined transactions_.
+Most DML statements initiate transactions implicitly at the start of execution.
+See <<Implicit_Transactions,Implicit Transactions>>.
+
+However, even if a transaction is initiated implicitly, you must end a transaction explicitly with the COMMIT WORK
+statement or the ROLLBACK WORK statement. If AUTOCOMMIT is on, you do not need to end a transaction explicitly.
+
+[[Rules_for_DML_Statements]]
+=== Rules for DML Statements
+
+If deadlock occurs, the DML statement times out and receives an error.
+
+[[Effect_of_AUTOCOMMIT_Option]]
+=== Effect of AUTOCOMMIT Option
+
+AUTOCOMMIT is an option that can be set in a SET TRANSACTION statement. It specifies whether Trafodion SQL will commit
+automatically, or roll back if an error occurs, at the end of statement execution. This option applies to any statement
+for which the system initiates a transaction. See <<SET_TRANSACTION_Statement,SET TRANSACTION Statement>>.
+
+If this option is set to ON, Trafodion SQL automatically commits any changes, or rolls back any changes, made to the
+database at the end of statement execution.
+
+[[Concurrency]]
+=== Concurrency
+
+Concurrency is defined by two or more processes accessing the same data at the same time. The degree of concurrency
+available &#8212; whether a process that requests access to data that is already being accessed is given access or placed
+in a wait queue &#8212; depends on the purpose of the access mode (read or update) and the isolation level. Currently, the only
+isolation level is READ COMMITTED.
+
+Trafodion SQL provides concurrent database access for most operations and controls database access through concurrency
+control and the mechanism for opening and closing tables. For DML operations, the access option affects the degree of
+concurrency. See <<Data_Consistency_and_Access_Optiones,Data Consistency and Access Options>>.
+
+[[Transaction_Isolation_Levels]]
+=== Transaction Isolation Levels
+
+A transaction has an isolation level that is <<READ_COMMITTED,READ COMMITTED>>.
+
+[[read_committed]]
+==== READ COMMITTED
+
+This option, which is ANSI compliant, allows your transaction to access only committed data. No row locks are acquired
+when READ COMMITTED is the specified isolation level.
+
+READ COMMITTED provides the next level of data consistency. A transaction executing with this isolation level does not
+allow dirty reads, but both nonrepeatable reads and phantoms are possible.
+
+READ COMMITTED provides sufficient consistency for any transaction that does not require a repeatable-read capability.
+
+The default isolation level is READ COMMITTED.
+
+<<<
+[[ANSI_Compliance_and_Trafodion_SQL_Extensions]]
+== ANSI Compliance and Trafodion SQL Extensions
+
+Trafodion SQL complies most closely with Core SQL 99. Trafodion SQL also includes some features from SQL 99 and part of
+the SQL 2003 standard, and special Trafodion SQL extensions to the SQL language.
+
+Statements and SQL elements in this manual are ANSI compliant unless specified as Trafodion SQL extensions.
+
+[[ANSI_Compliant_Statements]]
+=== ANSI-Compliant Statements
+
+These statements are ANSI compliant, but some might contain Trafodion SQL extensions:
+
+|===
+| <<ALTER_TABLE_Statement,ALTER TABLE Statement>>           | <<CALL_Statement,CALL Statement>>
+| <<COMMIT_WORK_Statement,COMMIT WORK Statement>>           | <<CREATE_FUNCTION_Statement,CREATE FUNCTION Statement>>
+| <<CREATE_PROCEDURE_Statement,CREATE PROCEDURE Statement>> | <<CREATE_ROLE_Statement,CREATE ROLE Statement>>
+| <<CREATE_SCHEMA_Statement,CREATE SCHEMA Statement>>       | <<CREATE_TABLE_Statement,CREATE TABLE Statement>>
+| <<CREATE_VIEW_Statement,CREATE VIEW Statement>>           | <<DELETE_Statement,DELETE Statement>>
+| <<DROP_FUNCTION_Statement,DROP FUNCTION Statement>>       | <<DROP_PROCEDURE_Statement,DROP PROCEDURE Statement>>
+| <<DROP_ROLE_Statement,DROP ROLE Statement>>               | <<DROP_SCHEMA_Statement,DROP SCHEMA Statement>>
+| <<DROP_TABLE_Statement,DROP TABLE Statement>>             | <<DROP_VIEW_Statement,DROP VIEW Statement>>
+| <<EXECUTE_Statement,EXECUTE Statement>>                   | <<GRANT_Statement,GRANT Statement>>
+| <<GRANT_ROLE_Statement,GRANT ROLE Statement>>             | <<INSERT_Statement,INSERT Statement>>
+| <<MERGE_Statement,MERGE Statement>>                       | <<PREPARE_Statement,PREPARE Statement>>
+| <<REVOKE_Statement,REVOKE Statement>>                     | <<REVOKE_ROLE_Statement,REVOKE ROLE Statement>>
+| <<ROLLBACK_WORK_Statement,ROLLBACK WORK Statement>>       | <<SELECT_Statement,SELECT Statement>>
+| <<SET_SCHEMA_Statement,SET SCHEMA Statement>>             | <<SET_TRANSACTION_Statement,SET TRANSACTION Statement>>
+| <<TABLE_Statement,TABLE Statement>>                       | <<UPDATE_Statement,UPDATE Statement>>
+| <<VALUES_Statement,VALUES Statement>>
+|===
+
+<<<
+[[Statements_That_Are_Trafodion_SQL_Extensions]]
+=== Statements That Are Trafodion SQL Extensions
+
+These statements are Trafodion SQL extensions to the ANSI standard.
+
+|===
+| <<ALTER_LIBRARY_Statement,ALTER LIBRARY Statement>>                           | <<ALTER_USER_Statement,ALTER USER Statement>>
+| <<BEGIN_WORK_Statement,BEGIN WORK Statement>>                                 | <<CONTROL_QUERY_CANCEL_Statement,CONTROL QUERY CANCEL Statement>>
+| <<CONTROL_QUERY_DEFAULT_Statement,CONTROL QUERY DEFAULT Statement>>           | <<CREATE_INDEX_Statement,CREATE INDEX Statement>>
+| <<CREATE_LIBRARY_Statement,CREATE LIBRARY Statement>>                         | <<DROP_INDEX_Statement,DROP INDEX Statement>>
+| <<DROP_LIBRARY_Statement,DROP LIBRARY Statement>>                             | <<EXPLAIN_Statement,EXPLAIN Statement>>
+| <<GET_Statement,GET Statement>>                                               | <<GET_HBASE_OBJECTS_Statement,GET HBASE OBJECTS Statement>>
+| <<GET_VERSION_OF_METADATA_Statement,GET VERSION OF METADATA Statement>>       | <<GET_VERSION_OF_SOFTWARE_Statement,GET VERSION OF SOFTWARE Statement>>
+| <<GRANT_COMPONENT_PRIVILEGE_Statement,GRANT COMPONENT PRIVILEGE Statement>>   | <<INVOKE_Statement,INVOKE Statement>>
+| <<LOAD_Statement,LOAD Statement>>                                             | <<REGISTER_USER_Statement,REGISTER USER Statement>>
+| <<REVOKE_COMPONENT_PRIVILEGE_Statement,REVOKE COMPONENT PRIVILEGE Statement>> | <<SHOWCONTROL_Statement,SHOWCONTROL Statement>>
+| <<SHOWDDL_Statement,SHOWDDL Statement>>                                       | <<SHOWDDL_SCHEMA_Statement,SHOWDDL SCHEMA Statement>>
+| <<SHOWSTATS_Statement,SHOWSTATS Statement>>                                   | <<UNLOAD_Statement,UNLOAD Statement>>
+| <<UNREGISTER_USER_Statement,UNREGISTER USER Statement>>                       | <<UPDATE_STATISTICS_Statement,UPDATE STATISTICS Statement>>
+| <<UPSERT_Statement,UPSERT Statement>>
+|===
+
+<<<
+[[ANSI_Compliant_Functions]]
+=== ANSI-Compliant Functions
+
+These functions are ANSI compliant, but some might contain Trafodion SQL extensions:
+
+|===
+| <<AVG,AVG function>>          | <<CASE, CASE expression>>
+| <<CAST,CAST expression>>      | <<CHAR_LENGTH,CHAR_LENGTH>>
+| <<COALESCE,COALESCE>>         | <<COUNT,COUNT Function>>
+| <<CURRENT,CURRENT>>           | <<CURRENT_DATE,CURRENT_DATE>>
+| <<CURRENT_TIME,CURRENT_TIME>> | <<CURRENT_TIMESTAMP,CURRENT_TIMESTAMP>>
+| <<CURRENT_USER,CURRENT_USER>> | <<EXTRACT,EXTRACT>>
+| <<LOWER,LOWER>>               | <<MAX,MAX>>
+| <<MIN,MIN>>                   | <<NULLIF,NULLIF>>
+| <<OCTET_LENGTH,OCTET_LENGTH>> | <<POSITION,POSITION>>
+| <<SESSION_USER,SESSION_USER>> | <<SUBSTRING,SUBSTRING>>
+| <<SUM,SUM>>                   | <<TRIM,TRIM>>
+| <<UPPER,UPPER>>
+|===
+
+All other functions are Trafodion SQL extensions.
+
+== Trafodion SQL Error Messages
+
+Trafodion SQL reports error messages and exception conditions. When an error condition occurs,
+Trafodion SQL returns a message number and a brief description of the condition.
+
+*Example*
+
+Trafodion SQL might display this error message:
+
+```
+*** ERROR[1000] A syntax error occurred.
+```
+
+The message number is the SQLCODE value (without the sign). In this example, the SQLCODE value is `1000`.
+
+
+
+
+
+
+
+