You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/08/10 03:56:03 UTC

[4/4] trafodion git commit: [TRAFODION-3178] Correct Syntax Descriptions of *CREATE PROCEDURE Statement* and Fix Typos in *Trafodion SQL Reference Manual*

[TRAFODION-3178] Correct Syntax Descriptions of *CREATE PROCEDURE 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/fc545d26
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/fc545d26
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/fc545d26

Branch: refs/heads/master
Commit: fc545d26bcb48aadaba786d0f032a49fc2e7dfa1
Parents: c1aa0e6
Author: liu.yu <qw...@hotmail.com>
Authored: Tue Aug 7 19:08:23 2018 +0800
Committer: liu.yu <qw...@hotmail.com>
Committed: Fri Aug 10 11:55:23 2018 +0800

----------------------------------------------------------------------
 .../src/asciidoc/_chapters/sql_clauses.adoc     |  3 +-
 .../sql_functions_and_expressions.adoc          | 79 ++++++++++++--------
 .../_chapters/sql_language_elements.adoc        |  6 +-
 .../src/asciidoc/_chapters/sql_statements.adoc  | 26 +++----
 4 files changed, 66 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc545d26/docs/sql_reference/src/asciidoc/_chapters/sql_clauses.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_clauses.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_clauses.adoc
index 2f2b5ad..9c44673 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_clauses.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_clauses.adoc
@@ -1053,8 +1053,7 @@ expressions in each item must be the same as the number of value columns
 in the column list.
 +
 In the example TRANSPOSE A,B,C AS V, the items are A,B, and C, and the
-value column is V. This form can be thought of as a shorter way of writing TRANSPOSE
-(A),(B),(C) AS (V).
+value column is V. This form can be thought of as a shorter way of writing TRANSPOSE (A),(B),\(C) AS (V).
 
 * `_transpose-item-list_`
 +

http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc545d26/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
index 009d409..5f7be94 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
@@ -29,22 +29,29 @@
 This section describes the syntax and semantics of specific functions
 and expressions that you can use in {project-name} SQL statements. The
 functions and expressions are categorized according to their
-functionality.
+functionality:
 
-[[standard_normalization]]
-== Standard Normalization
+[[categories]]
+== Categories
 
-For datetime functions, the definition of standard normalization is: If
-the ending day of the resulting date is invalid, the day will be rounded
-DOWN to the last day of the result month.
+Use these types of functions within an SQL value expression:
 
-== Aggregate (Set) Functions
+** Aggregate (Set) Functions
+** Character String Functions
+** Datetime Functions
+** Mathematical Functions
+** Sequence Functions
+** Other Functions and Expressions
+
+For more information about SQL value expressions, see <<expressions,Expressions>>. 
+
+=== Aggregate (Set) Functions
 
 An aggregate (or set) function operates on a group or groups of rows
 retrieved by the SELECT statement or the subquery in which the aggregate
 function appears.
 
-
+.Overview of Aggregate (Set) Functions
 [cols="25%,75%"]
 |===
 | <<avg_function,AVG Function>>                 | Computes the average of a group of numbers derived from the evaluation
@@ -66,10 +73,8 @@ derived from the evaluation of the expression argument of the function.
 The numbers can be weighted.
 | <<sum_function,SUM Function>>                 | Computes the sum of a group of numbers derived from the evaluation of
 the expression argument of the function.
-"VARIANCE Function"
-Computes the statistical variance of a group of numbers derived from the
-evaluation of the expression argument of the function. The numbers can
-be weighted.
+| <<variance_function,VARIANCE Function>>       | Computes the statistical variance of a group of numbers derived from the
+evaluation of the expression argument of the function. The numbers can be weighted.
 |===
 
 
@@ -89,7 +94,7 @@ list, all rows of the SELECT result table form the one and only group.
 See the individual entry for the function.
 
 [[character_string_functions]]
-== Character String Functions
+=== Character String Functions
 
 These functions manipulate character strings and use a character value
 expression as an argument or return a result of a character data type.
@@ -97,7 +102,7 @@ Character string functions treat each single-byte or multi-byte character
 in an input string as one character, regardless of the byte length of
 the character.
 
-
+.Overview of Character String Functions
 [cols="25%,75%"]
 |===
 | <<ascii_function,ASCII Function>>                       | Returns the ASCII code value of the first character of a character value
@@ -108,8 +113,8 @@ CHARACTER_LENGTH.
 | <<code_value_function,CODE_VALUE Function>>             | Returns an unsigned integer that is the code point of the first
 character in a character value expression that can be associated with
 one of the supported character sets.
-| <<concat_function,CONCAT Function>>                     | Returns the concatenation of two character value expressions as a string
-value. You can also use the concatenation operator (\|\|).
+| <<concat_function,CONCAT Function>>                     | Returns the concatenation of two character value expressions as a string value. 
+You can also use the concatenation operator.
 | <<insert_function,INSERT Function>>                     | Returns a character string where a specified number of characters within
 the character string have been deleted and then a second character
 string has been inserted at a specified start position.
@@ -147,12 +152,11 @@ character set.
 See the individual entry for the function.
 
 [[datetime_functions]]
-== Datetime Functions
+=== Datetime Functions
 
 These functions use either a datetime value expression as an argument or
 return a result of datetime data type:
 
-[caption="Table 7-3 "]
 .Overview of DATETIME Functions
 [cols="25%,50%,25%"]
 |===
@@ -258,10 +262,11 @@ corresponding week of the year.
 See the individual entry for the function.
 
 [[lob_functions]]
-== LOB Functions
+=== LOB Functions
 
 Trafodion provides following LOB functions to process LOB data.
 
+.Overview of LOB Functions
 [cols="25%,75%"]
 |===
 | <<emptyblob_function,EMPTY_BLOB() Function>>   | Creates a dummy LOB handle of type BLOB.
@@ -276,10 +281,11 @@ Trafodion provides following LOB functions to process LOB data.
 |===
 
 [[mathematical_functions]]
-== Mathematical Functions
+=== Mathematical Functions
 
 Use these mathematical functions within an SQL numeric value expression:
 
+.Overview of Mathematical Functions
 [cols="25%,75%"]
 |===
 | <<abs_function,ABS Function>>         | Returns the absolute value of a numeric value expression.
@@ -315,9 +321,10 @@ returns 0. If value is greater than zero, returns 1.
 See the individual entry for the function.
 
 [[encryption_functions]]
-== Encryption Functions
+=== Encryption Functions
 Use these functions within an SQL value expression to do data encryption or hashing:
 
+.Overview of Encryption Functions
 [cols="25%,75%"]
 |===
 | <<md5_function,MD5 Function>>         | Returns MD5 checksum
@@ -326,7 +333,7 @@ Use these functions within an SQL value expression to do data encryption or hash
 |===
 
 [[sequence_functions]]
-== Sequence Functions
+=== Sequence Functions
 
 Sequence functions operate on ordered rows of the intermediate result
 table of a SELECT statement that includes a SEQUENCE BY clause. Sequence
@@ -342,8 +349,9 @@ sorted result set must be available to compute the result of the
 sequence function.
 
 [[difference_sequence_functions]]
-=== Difference sequence functions
+==== Difference sequence functions
 
+.Overview of Difference Sequence Functions
 [cols="25%,75%"]
 |===
 | <<diff1_function,DIFF1 Function>> | Calculates differences between values of a column expression in the current row and previous rows.
@@ -351,8 +359,9 @@ sequence function.
 |===
 
 [[moving_sequence_functions]]
-=== Moving sequence functions
+==== Moving sequence functions
 
+.Overview of Moving Sequence Functions
 [cols="25%,75%"]
 |===
 | <<movingcount_function,MOVINGCOUNT Function>>       | Returns the number of non-null values of a column expression in the current window.
@@ -363,9 +372,10 @@ sequence function.
 | <<movingvariance_function,MOVINGVARIANCE Function>> | Returns the variance of non-null values of a column expression in the current window.
 |===
 
-Offset sequence function
-=== Offset sequence function
+[[offset_sequence_function]]
+==== Offset sequence function
 
+.Overview of Offset Sequence Functions
 [cols="25%,75%"]
 |===
 | <<offset_function,OFFSET Function>> | Retrieves columns from previous rows.
@@ -373,8 +383,9 @@ Offset sequence function
 
 <<<
 [[running_sequence_functions]]
-=== Running sequence functions
+==== Running sequence functions
 
+.Overview of Running Sequence Functions
 [cols="25%,75%"]
 |===
 | <<runningavg_function,RUNNINGAVG Function>>             | Returns the average of non-null values of a column expression up to and including the current row.
@@ -388,8 +399,9 @@ Offset sequence function
 |===
 
 [[other_sequence_functions]]
-=== Other sequence functions
+==== Other sequence functions
 
+.Overview of Other Sequence Functions
 [cols="25%,75%"]
 |===
 | <<lastnotnull_function,LASTNOTNULL Function>>               | Returns the last non-null value for the specified column expression. If only null values have been returned, returns null.
@@ -402,11 +414,11 @@ See <<sequence_by_clause,SEQUENCE BY Clause>> and the individual entry for each
 
 <<<
 [[other_functions_and_expressions]]
-== Other Functions and Expressions
+=== Other Functions and Expressions
 
 Use these other functions and expressions in an SQL value expression:
 
-
+.Overview of Other Functions and Expressions
 [cols="25%,75%"]
 |===
 | <<authname_function,AUTHNAME Function>>                         | Returns the authorization name associated with the specified authorization ID number.
@@ -433,6 +445,13 @@ associated with the specified user ID number.
 
 See the individual entry for the function.
 
+[[standard_normalization]]
+=== Standard Normalization
+
+For datetime functions, the definition of standard normalization is: If
+the ending day of the resulting date is invalid, the day will be rounded
+DOWN to the last day of the result month.
+
 <<<
 [[abs_function]]
 == ABS Function

http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc545d26/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
index f9e60b0..733be2c 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc
@@ -386,7 +386,7 @@ depending on precision
 |Numeric (extended numeric precision)^7^ | NUMERIC (precision 19 to 128)  | Binary integer; signed or unsigned    | Stored as multiple chunks of 16-bit integers, with a minimum storage
 length of 8 bytes.
 .3+| Floating point number^7^ | FLOAT[(_precision_)] | Floating point number (64 bits); precision designates from 1 through 52 bits of precision | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes
-| REAL                  | Floating point number (32 bits)        | +/- 1.17549435e-38 through +/ 3.40282347e+38; stored in 4 bytes
+| REAL                  | Floating point number (32 bits)        | +/- 1.17549435e-38 through +/- 3.40282347e+38; stored in 4 bytes
 | DOUBLE PRECISION      | Floating-point numbers (64 bits) with 1 through 52 bits of precision (52 bits of binary precision and 1 bits of exponent) | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes
 | Decimal number^6^        | DECIMAL (1,_scale_) to DECIMAL (18,_scale_)     | Decimal number with optional scale; stored as ASCII characters; signed or unsigned for 1 to 9 digits; signed required for 10 or more digits
 | 1 to 18 digits. Byte length equals the number of digits. Sign is stored as the first bit of the leftmost byte.
@@ -3217,10 +3217,10 @@ The IN predicate is true if and only if either of these is true:
 * The result of the `_row-value-constructor_` (a row or sequence of
 values) is equal to any row of column values specified by
 `_table-subquery_`.
-
++
 A table subquery is a query expression and can be specified as a form of
 a simple table; for example, as the VALUES keyword followed by a list of
-row values. See <<select_statement,SELECT Statement>>.
+row values. For more information, see <<select_statement,SELECT Statement>>.
 
 * The result of the `_row-value-constructor_` (a single value) is equal to
 any of the values specified by the list of expressions

http://git-wip-us.apache.org/repos/asf/trafodion/blob/fc545d26/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 0b773b5..b768085 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
@@ -2278,19 +2278,19 @@ pic[ture] x^1^ +
 nchar +
 nchar varying +
 national char[acter] +
-national char[acter] varying | java.lang.string
-| date | java.sql.date
-| time | java.sql.time
-| timestamp | java.sql.timestamp
+national char[acter] varying | java.lang.String
+| date | java.sql.Date
+| time | java.sql.Time
+| timestamp | java.sql.Timestamp
 | dec[imal]^2^ +
 pic[ture] s9^3^ +
-numeric (including numeric with a precision greater than eighteen)^2^ | java.math.bigdecimal
+numeric (including numeric with a precision greater than eighteen)^2^ | java.math.Bigdecimal
 | smallint^2^ | short
-| int[eger]^2^ | int or java.lang.integer^4^
-| largeint^2^ | long or java.lang.long^4^
-| float | double or java.lang.double^4^
-| real | float or java.lang.float^4^
-| double precision | double or java.lang.double^4^
+| int[eger]^2^ | int or java.lang.Integer^4^
+| largeint^2^ | long or java.lang.Long^4^
+| float | double or java.lang.Double^4^
+| real | float or java.lang.Float^4^
+| double precision | double or java.lang.Double^4^
 |===
 +
 1. the trafodion database stores pic x as a char data type.
@@ -2321,13 +2321,13 @@ specifies the signature of the SPJ method and consists of:
 +
 `([_java-datatype_[, _java-datatype_]&#8230;])`
 +
-The Java signature is necessary only if you want to specify a Java wrapper class (for example, `java.lang.integer`) instead of a java
+The Java signature is necessary only if you want to specify a Java wrapper class (for example, `java.lang.Integer`) instead of a java
 primitive data type (for example, `int`). An SQL data type maps to a Java primitive data type by default.
 +
-The Java signature is case-sensitive and must be placed within parentheses, such as `(java.lang.integer, java.lang.integer`).
+The Java signature is case-sensitive and must be placed within parentheses, such as `(java.lang.Integer, java.lang.Integer`).
 The signature must specify each of the parameter data types in the order they appear in the Java method definition within
 the class file. Each Java data type that corresponds to an out or inout parameter must be followed by empty square
-brackets (`[ ]`), such as `java.lang.integer[]`.
+brackets (`[ ]`), such as `java.lang.Integer[]`.
 +
 <<<
 *** `_java-datatype_`