[jira] [Commented] (TRAFODION-2855) Correct the syntax descriptions of LOAD Statement for *Trafodion SQL Reference Manual* 2

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296404#comment-16296404
 ] 

ASF GitHub Bot commented on TRAFODION-2855:
---

GitHub user liuyu000 opened a pull request:

https://github.com/apache/incubator-trafodion/pull/1356

[TRAFODION-2855] Correct the syntax descriptions of LOAD Statement for 
*Trafodion SQL Reference Manual* 2



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

$ git pull https://github.com/liuyu000/incubator-trafodion LoadStatement2

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

https://github.com/apache/incubator-trafodion/pull/1356.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 #1356


commit 30f3ea9a2b3ed6bd52e83227911b46b17dd9c99b
Author: liu.yu 
Date:   2017-12-19T07:42:53Z

Correct the syntax descriptions of LOAD Statement for *Trafodion Reference 
Manual* 2




> Correct the syntax descriptions of LOAD Statement for *Trafodion SQL 
> Reference Manual* 2 
> -
>
> Key: TRAFODION-2855
> URL: https://issues.apache.org/jira/browse/TRAFODION-2855
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TRAFODION-2855) Correct the syntax descriptions of LOAD Statement for *Trafodion SQL Reference Manual* 2

2017-12-18 Thread Liu Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Liu Yu updated TRAFODION-2855:
--
Summary: Correct the syntax descriptions of LOAD Statement for *Trafodion 
SQL Reference Manual* 2   (was: Correct the syntax descriptions of LOAD 
Statement for *Trafodion SQL Reference Manual*2 )

> Correct the syntax descriptions of LOAD Statement for *Trafodion SQL 
> Reference Manual* 2 
> -
>
> Key: TRAFODION-2855
> URL: https://issues.apache.org/jira/browse/TRAFODION-2855
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TRAFODION-2855) Correct the syntax descriptions of LOAD Statement for *Trafodion SQL Reference Manual*2

2017-12-18 Thread Liu Yu (JIRA)
Liu Yu created TRAFODION-2855:
-

 Summary: Correct the syntax descriptions of LOAD Statement for 
*Trafodion SQL Reference Manual*2 
 Key: TRAFODION-2855
 URL: https://issues.apache.org/jira/browse/TRAFODION-2855
 Project: Apache Trafodion
  Issue Type: Documentation
Reporter: Liu Yu
Assignee: Liu Yu






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296352#comment-16296352
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157678749
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3526,7 +3526,7 @@ EMPTY_CLOB()
 
 * If EMPTY_CLOB() is specified, then a dummy lob handle is created.
 
-** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate the LOB with new data. If the LOB had 
data previously associated with it, it will be erased.
 
 ** The dummy LOB handle will get the same datatype as the underlying 
column.
 +
--- End diff --

Here, maybe you can elaborate by  explaining what  "getting the same 
datatype as column " means .  If the column is declared as type LOB 'external' 
in the create statement, the dummy lob handle will get the type external and 
this LOB can only handle LOB's that are external. 
If the column is declared without the external clause, the LOB data will be 
maintained within the Trafodion space in the internal location maintained by 
Trafodion.


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296099#comment-16296099
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655684
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -7182,6 +7404,40 @@ SELECT STDDEV (price * qty_available) FROM 
sales.parts;
 --- 1 row(s) selected.
 ```
 
+<<<
+[[stringtolob_function]]
+== STRINGTOLOB Function
+
+[[stringtolob_function_syntax]]
+=== Syntax Descriptions of STRINGTOLOB Function
+
+The STRINGTOLOB function converts a simple string literal into LOB format. 
This function can be used in INSERT or UPDATE statement.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296100#comment-16296100
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655715
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc ---
@@ -367,6 +369,9 @@ SECOND 0-59 +
 FRACTION(n) 0-99 +
 in which n is the number of significant digits (default is 6; minimum is 
1; maximum is 6); +
 stored in 2, 4, or 8 bytes depending on number of digits^2^
+.2+| LOB Data Types .2+| LOB | BLOB | Binary Large Object .2+| 10G – no 
limit + 
+Currently it sets to 10G (default) and it’s controlled by the `CQD 
LOB_MAX_SIZE`, the size can be changed depending on your needs.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296098#comment-16296098
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655670
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3638,6 +3776,52 @@ The example displays only part of the result table 
of the EXPLAIN
 function. It first uses the EXPLAIN function to generate the table and
 then selects the desired columns.
 
+<<<
+[[externaltolob_function]]
+== EXTERNALTOLOB Function
+
+[[externaltolob_function_syntax]]
+=== Syntax Descriptions of EXTERNALTOLOB Function
+
+The EXTERNALTOLOB function converts data from an external file into LOB 
format. This function can be used in INSERT or UPDATE statement.  
--- End diff --

"an INSERT or UPDATE statement" is preferable, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296097#comment-16296097
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655659
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3679,40 +3863,43 @@ EXTRACT (YEAR FROM INTERVAL '01-09' YEAR TO MONTH)
 +
 The result is 1.
 
-
 <<<
-[[hour_function]]
-=== HOUR Function
+[[filetolob_function]]
+== FILETOLOB Function
 
-The HOUR function converts a TIME or TIMESTAMP expression into an
-INTEGER value in the range 0 through 23 that represents the
-corresponding hour of the day.
+[[filetolob_function_syntax]]
+=== Syntax Descriptions of FILETOLOB Function
 
-HOUR is a {project-name} SQL extension.
+The FILETOLOB function converts data from a local linux/hdfs file into LOB 
format. This function can be used in INSERT or UPDATE statement.  
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296091#comment-16296091
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655538
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+
+** The dummy LOB handle will get the same datatype as the underlying 
column.
++
+For example, if the LOB column was defined as `‘EXTERNAL’` during table 
creation, then the LOB column gets that type. If it’s not defined, then it is 
considered as a regular LOB. 
+
+* An empty LOB is distinct from a LOB containing a string of length zero 
or a null LOB.
+
+[[examples_of_emptyblob_function]]
+=== Examples of EMPTY_BLOB() Function
+
+* This example uses the EMPTY_BLOB to insert an empty LOB and creates a 
dummy LOB handle. 
++
+```
+insert into test1 values (1, empty_blob());
+```
+
+<<<
+[[emptyclob_function]]
+== EMPTY_CLOB() Function
+
+[[syntax_descriptions_of_emptyclob_function]]
+=== Syntax Descriptions of EMPTY_CLOB() Function
+
+The EMPTY_CLOB() function creates a dummy LOB handle with CLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
--- End diff --

"an INSERT or UPDATE statement" is preferable, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296092#comment-16296092
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655567
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+
+** The dummy LOB handle will get the same datatype as the underlying 
column.
++
+For example, if the LOB column was defined as `‘EXTERNAL’` during table 
creation, then the LOB column gets that type. If it’s not defined, then it is 
considered as a regular LOB. 
+
+* An empty LOB is distinct from a LOB containing a string of length zero 
or a null LOB.
+
+[[examples_of_emptyblob_function]]
+=== Examples of EMPTY_BLOB() Function
+
+* This example uses the EMPTY_BLOB to insert an empty LOB and creates a 
dummy LOB handle. 
++
+```
+insert into test1 values (1, empty_blob());
+```
+
+<<<
+[[emptyclob_function]]
+== EMPTY_CLOB() Function
+
+[[syntax_descriptions_of_emptyclob_function]]
+=== Syntax Descriptions of EMPTY_CLOB() Function
+
+The EMPTY_CLOB() function creates a dummy LOB handle with CLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_CLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion LOB 
Guide].
+
+```
+EMPTY_CLOB()
+```
+
+[[considerations_for_emptyclob_function]]
+=== Considerations for EMPTY_CLOB() Function
+
+* If EMPTY_CLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296089#comment-16296089
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655475
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+
+** The dummy LOB handle will get the same datatype as the underlying 
column.
++
+For example, if the LOB column was defined as `‘EXTERNAL’` during table 
creation, then the LOB column gets that type. If it’s not defined, then it is 
considered as a regular LOB. 
+
+* An empty LOB is distinct from a LOB containing a string of length zero 
or a null LOB.
+
+[[examples_of_emptyblob_function]]
+=== Examples of EMPTY_BLOB() Function
+
+* This example uses the EMPTY_BLOB to insert an empty LOB and creates a 
dummy LOB handle. 
++
+```
+insert into test1 values (1, empty_blob());
+```
+
+<<<
+[[emptyclob_function]]
+== EMPTY_CLOB() Function
+
+[[syntax_descriptions_of_emptyclob_function]]
+=== Syntax Descriptions of EMPTY_CLOB() Function
+
+The EMPTY_CLOB() function creates a dummy LOB handle with CLOB.
--- End diff --

thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296090#comment-16296090
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655482
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
--- End diff --

thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296088#comment-16296088
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655468
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296085#comment-16296085
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655159
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
--- End diff --

"an INSERT or UPDATE statement" is preferable, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296082#comment-16296082
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655082
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -926,6 +944,45 @@ The following are BITAND restrictions:
 --- 1 row(s) selected
 ```
 
+<<<
+[[buffertolob_function]]
+== BUFFERTOLOB Function 
+
+[[buffertolob_function_syntax]]
+=== Syntax Descriptions of BUFFERTOLOB Function
+
+The BUFFERTOLOB function takes an address and a size of an input buffer, 
and converts the data pointed to by that buffer into LOB. This function can be 
used in INSERT or UPDATE statement.
+
+BUFFERTOLOB function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+BUFFERTOLOB(LOCATION lob source buffer address, LENGTH lob length value)   
+```
+
+* _lob source buffer address_
++
+The long value of the user buffer address in int64.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296084#comment-16296084
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157655101
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296079#comment-16296079
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157654894
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -926,6 +944,45 @@ The following are BITAND restrictions:
 --- 1 row(s) selected
 ```
 
+<<<
+[[buffertolob_function]]
+== BUFFERTOLOB Function 
+
+[[buffertolob_function_syntax]]
+=== Syntax Descriptions of BUFFERTOLOB Function
+
+The BUFFERTOLOB function takes an address and a size of an input buffer, 
and converts the data pointed to by that buffer into LOB. This function can be 
used in INSERT or UPDATE statement.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296078#comment-16296078
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157654856
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
+| <>  | Converts a simple 
string literal into LOB format.
+| <>  | Converts data from a 
local linux/hdfs file into LOB format.
+| <> | Takes an address and 
a size of an input buffer, and converts the data pointed to by that buffer into 
LOB format.
+| <> | Converts data from 
an external file into LOB format.
+| LOBTOSTRING | Converts LOB data into simple string 
literal.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296077#comment-16296077
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157654813
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
+| <>  | Converts a simple 
string literal into LOB format.
+| <>  | Converts data from a 
local linux/hdfs file into LOB format.
+| <> | Takes an address and 
a size of an input buffer, and converts the data pointed to by that buffer into 
LOB format.
--- End diff --

OK, thanks Dave, for your detailed explanations. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296076#comment-16296076
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157654703
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
--- End diff --

OK, thanks Dave. :)


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295934#comment-16295934
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157637308
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
--- End diff --

Similarly


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295947#comment-16295947
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157639136
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc ---
@@ -367,6 +369,9 @@ SECOND 0-59 +
 FRACTION(n) 0-99 +
 in which n is the number of significant digits (default is 6; minimum is 
1; maximum is 6); +
 stored in 2, 4, or 8 bytes depending on number of digits^2^
+.2+| LOB Data Types .2+| LOB | BLOB | Binary Large Object .2+| 10G – no 
limit + 
+Currently it sets to 10G (default) and it’s controlled by the `CQD 
LOB_MAX_SIZE`, the size can be changed depending on your needs.
--- End diff --

Possible word smith: "Currently the limit defaults to 10Gb. This limit can 
be configured as needed using 'CQD LOB_MAX_SIZE'.


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295943#comment-16295943
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638744
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3638,6 +3776,52 @@ The example displays only part of the result table 
of the EXPLAIN
 function. It first uses the EXPLAIN function to generate the table and
 then selects the desired columns.
 
+<<<
+[[externaltolob_function]]
+== EXTERNALTOLOB Function
+
+[[externaltolob_function_syntax]]
+=== Syntax Descriptions of EXTERNALTOLOB Function
+
+The EXTERNALTOLOB function converts data from an external file into LOB 
format. This function can be used in INSERT or UPDATE statement.  
--- End diff --

"an INSERT or UPDATE statement" or "INSERT or UPDATE statements" sounds a 
bit better


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295941#comment-16295941
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638640
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+
+** The dummy LOB handle will get the same datatype as the underlying 
column.
++
+For example, if the LOB column was defined as `‘EXTERNAL’` during table 
creation, then the LOB column gets that type. If it’s not defined, then it is 
considered as a regular LOB. 
+
+* An empty LOB is distinct from a LOB containing a string of length zero 
or a null LOB.
+
+[[examples_of_emptyblob_function]]
+=== Examples of EMPTY_BLOB() Function
+
+* This example uses the EMPTY_BLOB to insert an empty LOB and creates a 
dummy LOB handle. 
++
+```
+insert into test1 values (1, empty_blob());
+```
+
+<<<
+[[emptyclob_function]]
+== EMPTY_CLOB() Function
+
+[[syntax_descriptions_of_emptyclob_function]]
+=== Syntax Descriptions of EMPTY_CLOB() Function
+
+The EMPTY_CLOB() function creates a dummy LOB handle with CLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_CLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion LOB 
Guide].
+
+```
+EMPTY_CLOB()
+```
+
+[[considerations_for_emptyclob_function]]
+=== Considerations for EMPTY_CLOB() Function
+
+* If EMPTY_CLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
--- End diff --

Similar to previous comment


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295946#comment-16295946
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638536
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
+
+** The dummy LOB handle will get the same datatype as the underlying 
column.
++
+For example, if the LOB column was defined as `‘EXTERNAL’` during table 
creation, then the LOB column gets that type. If it’s not defined, then it is 
considered as a regular LOB. 
+
+* An empty LOB is distinct from a LOB containing a string of length zero 
or a null LOB.
+
+[[examples_of_emptyblob_function]]
+=== Examples of EMPTY_BLOB() Function
+
+* This example uses the EMPTY_BLOB to insert an empty LOB and creates a 
dummy LOB handle. 
++
+```
+insert into test1 values (1, empty_blob());
+```
+
+<<<
+[[emptyclob_function]]
+== EMPTY_CLOB() Function
+
+[[syntax_descriptions_of_emptyclob_function]]
+=== Syntax Descriptions of EMPTY_CLOB() Function
+
+The EMPTY_CLOB() function creates a dummy LOB handle with CLOB.
--- End diff --

"...of type CLOB" sounds better to my ears.


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295942#comment-16295942
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638255
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
--- End diff --

Either "an INSERT or UPDATE statement" or "INSERT or UPDATE statements" is 
better


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295948#comment-16295948
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157637289
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
--- End diff --

Suggested wordsmith: "Creates a dummy LOB handle of type BLOB"


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295949#comment-16295949
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638951
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -7182,6 +7404,40 @@ SELECT STDDEV (price * qty_available) FROM 
sales.parts;
 --- 1 row(s) selected.
 ```
 
+<<<
+[[stringtolob_function]]
+== STRINGTOLOB Function
+
+[[stringtolob_function_syntax]]
+=== Syntax Descriptions of STRINGTOLOB Function
+
+The STRINGTOLOB function converts a simple string literal into LOB format. 
This function can be used in INSERT or UPDATE statement.
--- End diff --

same comment as before


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295938#comment-16295938
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157637747
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
+| <>  | Converts a simple 
string literal into LOB format.
+| <>  | Converts data from a 
local linux/hdfs file into LOB format.
+| <> | Takes an address and 
a size of an input buffer, and converts the data pointed to by that buffer into 
LOB format.
--- End diff --

Nit: To my ears, "Takes an address and the size of an input buffer..." 
sounds better. Probably the reason it sounds better to me is that I know the 
address is pointing to the input buffer. So, once we have said "an address" we 
have identified a specific input buffer, and "size" refers to the size of that 
specific buffer. So it requires the definite article rather than the indefinite 
article.

That said, perhaps another way of saying this is, "Takes the address and 
size of an input buffer, and converts the contents of that buffer into LOB 
format."


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295937#comment-16295937
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638107
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -926,6 +944,45 @@ The following are BITAND restrictions:
 --- 1 row(s) selected
 ```
 
+<<<
+[[buffertolob_function]]
+== BUFFERTOLOB Function 
+
+[[buffertolob_function_syntax]]
+=== Syntax Descriptions of BUFFERTOLOB Function
+
+The BUFFERTOLOB function takes an address and a size of an input buffer, 
and converts the data pointed to by that buffer into LOB. This function can be 
used in INSERT or UPDATE statement.
+
+BUFFERTOLOB function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+BUFFERTOLOB(LOCATION lob source buffer address, LENGTH lob length value)   
+```
+
+* _lob source buffer address_
++
+The long value of the user buffer address in int64.
--- End diff --

Perhaps, "The int64 value of the user buffer address"?


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295935#comment-16295935
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157637887
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -213,6 +213,24 @@ corresponding week of the year.
 
 See the individual entry for the function.
 
+[[lob_functions]]
+== LOB Functions
+
+Trafodion provides following LOB functions to process LOB data.
+
+[cols="25%,75%"]
+|===
+| <>   | Creates a dummy LOB 
handle with BLOB.
+| <>   | Creates a dummy LOB 
handle with CLOB.
+| <>  | Converts a simple 
string literal into LOB format.
+| <>  | Converts data from a 
local linux/hdfs file into LOB format.
+| <> | Takes an address and 
a size of an input buffer, and converts the data pointed to by that buffer into 
LOB format.
+| <> | Converts data from 
an external file into LOB format.
+| LOBTOSTRING | Converts LOB data into simple string 
literal.
--- End diff --

I would say, "Converts LOB data into a simple string literal."


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295940#comment-16295940
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638376
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
+
+This function can be used in INSERT or UPDATE statement, to initialize a 
LOB column or attribute to EMPTY.
+
+EMPTY_BLOB() function is a Trafodion SQL extension.
+
+For more information, see 
http://trafodion.incubator.apache.org/docs/lob_guide/index.html[Trafodion SQL 
Large Objects Guide].
+
+```
+EMPTY_BLOB()
+```
+
+[[considerations_for_emptyblob_function]]
+=== Considerations for EMPTY_BLOB() Function
+
+* If EMPTY_BLOB() is specified, then a dummy lob handle is created.
+
+** No data is associated with the empty LOBs yet, but these dummy LOB 
handles can later be used to populate with new LOB data. If the LOB had data 
previously associated with it, it will be erased.
--- End diff --

I would say, "...can later be used to populate the LOB with new data. ..."


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295945#comment-16295945
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638866
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3679,40 +3863,43 @@ EXTRACT (YEAR FROM INTERVAL '01-09' YEAR TO MONTH)
 +
 The result is 1.
 
-
 <<<
-[[hour_function]]
-=== HOUR Function
+[[filetolob_function]]
+== FILETOLOB Function
 
-The HOUR function converts a TIME or TIMESTAMP expression into an
-INTEGER value in the range 0 through 23 that represents the
-corresponding hour of the day.
+[[filetolob_function_syntax]]
+=== Syntax Descriptions of FILETOLOB Function
 
-HOUR is a {project-name} SQL extension.
+The FILETOLOB function converts data from a local linux/hdfs file into LOB 
format. This function can be used in INSERT or UPDATE statement.  
--- End diff --

same comment as before


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295936#comment-16295936
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157637971
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -926,6 +944,45 @@ The following are BITAND restrictions:
 --- 1 row(s) selected
 ```
 
+<<<
+[[buffertolob_function]]
+== BUFFERTOLOB Function 
+
+[[buffertolob_function_syntax]]
+=== Syntax Descriptions of BUFFERTOLOB Function
+
+The BUFFERTOLOB function takes an address and a size of an input buffer, 
and converts the data pointed to by that buffer into LOB. This function can be 
used in INSERT or UPDATE statement.
--- End diff --

Again, "...the size..." sounds better to my ears.


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2849) Add BLOB and CLOB for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295939#comment-16295939
 ] 

ASF GitHub Bot commented on TRAFODION-2849:
---

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


https://github.com/apache/incubator-trafodion/pull/1350#discussion_r157638195
  
--- Diff: 
docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---
@@ -3405,6 +3461,88 @@ DIFF2_I1TS
 --- 5 row(s) selected.
 ```
 
+<<<
+[[emptyblob_function]]
+== EMPTY_BLOB() Function
+
+[[syntax_descriptions_of_emptyblob_function]]
+=== Syntax Descriptions of EMPTY_BLOB() Function
+
+The EMPTY_BLOB() function creates a dummy LOB handle with BLOB.
--- End diff --

"...of type BLOB" perhaps


> Add BLOB and CLOB for *Trafodion SQL Reference Manual*
> --
>
> Key: TRAFODION-2849
> URL: https://issues.apache.org/jira/browse/TRAFODION-2849
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TRAFODION-2854) Load encounter Operating system error 201

2017-12-18 Thread Selvaganesan Govindarajan (JIRA)
Selvaganesan Govindarajan created TRAFODION-2854:


 Summary: Load encounter Operating system error 201
 Key: TRAFODION-2854
 URL: https://issues.apache.org/jira/browse/TRAFODION-2854
 Project: Apache Trafodion
  Issue Type: Bug
  Components: sql-exe
Reporter: Selvaganesan Govindarajan
Assignee: Selvaganesan Govindarajan
 Fix For: 2.3-incubating


Load data from hive data encounter 201 error, but using uspert using load the 
error is different


>>load with log error rows to '/bulkload/logs' into 
>>TRAFODION.ODS_SC.DM_FUNCTION_LOCATION select * from 
>>hive.hive.DM_FUNCTION_LOCATION;
Task: LOAD Status: Started Object: TRAFODION.ODS_SC.DM_FUNCTION_LOCATION
Task: CLEANUP Status: Started Time: 2017-12-15 10:04:17.366
Task: CLEANUP Status: Ended Time: 2017-12-15 10:04:17.385
Task: CLEANUP Status: Ended Elapsed Time: 00:00:00.019
   Logging Location: 
/bulkload/logs/ERR_TRAFODION.ODS_SC.DM_FUNCTION_LOCATION_20171215_020417
Task: LOADING DATA Status: Started Time: 2017-12-15 10:04:17.385



*** ERROR[2034] $Z000RN4:502: Operating system error 201 while communicating 
with server process $Z0211QE:526.

*** ERROR[2034] $Z000RN4:502: Operating system error 201 while communicating 
with server process $Z0211QE:526.

*** ERROR[2034] $Z000RN4:502: Operating system error 201 while communicating 
with server process $Z0211QE:526.



SQL>upsert using load into TRAFODION.ODS_SC.DM_FUNCTION_LOCATION select * from 
hive.hive.DM_FUNCTION_LOCATION;

*** ERROR[8411] A numeric overflow occurred during an arithmetic computation or 
data conversion. Conversion of Source Type:CHAR(REC_BYTE_F_ASCII,15 
BYTES,ISO88591) Source Value:214040391595900 to Target Type:DECIMAL 
SIGNED(REC_DECIMAL_LSE). [2017-12-15 13:46:59]
Additional Information  Core file and stack trace are under 
10.10.22.152:/opt/GuangXi_20171218

Account: root/linux

Step to analyze core:
[root@esggy-del-n002 GuangXi_20171218]# gdb
(gdb) source zgdb-GuangXi_20171218-
(gdb) file /opt/esgynDB223/export/bin64/tdm_arkesp
(gdb) core core.44989
(gdb) bt
#0 0x7f440e0ea1d7 in raise () from /opt/GuangXi_20171218/lib64/libc.so.6
#1 0x7f440e0eb8c8 in abort () from /opt/GuangXi_20171218/lib64/libc.so.6
#2 0x7f4410039f85 in os::abort(bool) () from 
/opt/GuangXi_20171218/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so
#3 0x7f44101dc383 in VMError::report_and_die() () from 
/opt/GuangXi_20171218/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so
004 0x7f441003f48f in JVM_handle_linux_signal () from 
/opt/GuangXi_20171218/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so
005 0x7f44100359d3 in signalHandler(int, siginfo*, void*) ()
   from /opt/GuangXi_20171218/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so
006 
007 0x7f440e1ffde0 in __memcpy_ssse3_back () from 
/opt/GuangXi_20171218/lib64/libc.so.6
008 0x7f441308aeaf in str_cpy_all (length=-7167, src=, 
tgt=0x7fff64f1ed60 "\200") at ../common/str.h:265
009 getLength (data=, this=0x80) at ../exp/exp_attrs.h:415
010 ExHbaseAccessBulkLoadPrepSQTcb::createLoggingRow (this=, 
tuppIndex=, tuppRow=0x7f43fe67e3d0 "", 
targetRow=0x7f43fe68e401 "", targetRowLen=@0x7fff64f1eea0: 0) at 
../executor/ExHbaseIUD.cpp:1754
011 0x7f441308ed1c in ExHbaseAccessBulkLoadPrepSQTcb::work 
(this=0x7f43fe662f48) at ../executor/ExHbaseIUD.cpp:1591
012 0x7f441309b46f in donotUpdateCounters (this=0x1343d9928) at 
../executor/ExStats.h:3729
013 ExScheduler::work (this=0x7f44141a2008, prevWaitTime=) 
at ../executor/ExScheduler.cpp:296
014 0x7f4412fc69ed in ExEspFragInstanceDir::fixupEntry (this=0x0, 
handle=320060680, numOfParentInstances=1693577552, da=...)
at ../executor/ex_esp_frag_dir.cpp:331
015 0x0040ca26 in runESP (argc=argc@entry=3, 
argv=argv@entry=0x7fff64f1f878, 
guaReceiveFastStart=guaReceiveFastStart@entry=0x0)
at ../bin/ex_esp_main.cpp:404
016 0x0040bd9b in main (argc=3, argv=0x7fff64f1f878) at 
../bin/ex_esp_main.cpp:258
(gdb)

This issue was observed at a customer installation that deployed EsgynDB



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2853) Memory leak of ComDiagsArea in Context

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295830#comment-16295830
 ] 

ASF GitHub Bot commented on TRAFODION-2853:
---

GitHub user selvaganesang opened a pull request:

https://github.com/apache/incubator-trafodion/pull/1355

[TRAFODION-2853] Memory leak of ComDiagsArea in Context

CLI entry points to LOB and Sequence generator didn't deallocate
the local diags area.

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

$ git pull https://github.com/selvaganesang/incubator-trafodion 
trafodion-2853

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

https://github.com/apache/incubator-trafodion/pull/1355.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 #1355


commit 84679539534747e52a18c07070011641062f8783
Author: selvaganesang 
Date:   2017-12-18T23:18:42Z

[TRAFODION-2853] Memory leak of ComDiagsArea in Context

CLI entry points to LOB and Sequence generator didn't deallocate
the local diags area.




> Memory leak of ComDiagsArea in Context
> --
>
> Key: TRAFODION-2853
> URL: https://issues.apache.org/jira/browse/TRAFODION-2853
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-exe
>Affects Versions: any
>Reporter: Selvaganesan Govindarajan
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.3-incubating
>
>
> There were instances that the executor master process has more than 1 GB of 
> memory account memory allocated, Looking at the size of allocation by 
> traversing the heap, it was found ComDiagsArea is leaked in ContextHeap.
> The heap traversal shows the addresses and the allocated size that were part 
> of context Heap that was leaking
> 0x7fdef4cc69b8 336
> 0x7fdef4cc6bc8 336
> 0x7fdef4cc6d18 336
> 0x7fdef4cc6e68 336
> 0x7fdef4cc6fb8 336
> 0x7fdef4cc71e0 336
> 0x7fdef4cc7330 336
> 0x7fdef4cc7480 336
> The actual address of the objects is 16 bytes from the above address
> (gdb) p *(ComDiagsArea *)0x7fdef4cc69c8  
> $9 = {
>= {
> _vptr.IpcMessageObj = 0x7fdfbe4bbc50, 
> s_ = {
>   objType_ = 13501, 
>   objVersion_ = 0, 
>   refCount_ = 1, 
>   objLength_ = 0, 
>   next_ = 0x0, 
>   endianness_ = 1 '\001', 
>   spare1_ = 0 '\000', 
>   spare2_ = 0, 
>   vPtrPad_ = 0x0
> }
>   }, 
>   members of ComDiagsArea: 
>   collHeapPtr_ = 0x7fdfb18eb128, 
>   errors_ = {
> > = {
>= {
> _vptr.NABasicObject = 0x7fdfbe4bbf10, 
> h_ = 0x0
>   }, 
>   members of NACollection: 
>   maxLength_ = 0, 
>   usedLength_ = 0, 
>   entries_ = 0, 
>   arr_ = 0x0, 
>   usages_ = 0x0, 
>   heap_ = 0x7fdfb18eb128
> }, 
> members of NAList: 
> first_ = 1, 
> last_ = 1, 
> userIndexCache_ = 1, 
> arrayIndexCache_ = 1
>   }, 
>   warnings_ = {
> ---Type  to continue, or q  to quit---
> > = {
>= {
> _vptr.NABasicObject = 0x7fdfbe4bbf10, 
> h_ = 0x0
>   }, 
>   members of NACollection: 
>   maxLength_ = 0, 
>   usedLength_ = 0, 
>   entries_ = 0, 
>   arr_ = 0x0, 
>   usages_ = 0x0, 
>   heap_ = 0x7fdfb18eb128
> }, 
> members of NAList: 
> first_ = 1, 
> last_ = 1, 
> userIndexCache_ = 1, 
> arrayIndexCache_ = 1
>   }, 
>   newCondition_ = 0x0, 
>   areMore_ = 0, 
>   lengthLimit_ = 30, 
>   rowCount_ = 0, 
>   theSQLFunction_ = 0, 
>   maxDiagsId_ = 0, 
>   avgStreamWaitTime_ = -1, 
>   cost_ = 0, 
>   flags_ = 0, 
>   rowsetRowCountArray_ = 0x0, 
>   fillers_ = '\000' 
> }
> (gdb) (gdb) p *(NAHeap *)0x7fdfb18eb128
> $10 = {
>= {
>  = {
>   _vptr.NABasicObject = 0x7fdfc1001870, 
>   h_ = 0x0
> }, 
> members of NAMemory: 
> name_ = "Heap in ContextCli\000\000", 
> type_ = NAMemory::DERIVED_MEMORY, 
> initialSize_ = 524288, 
> maximumSize_ = 18446744073709551615, 
> incrementSize_ = 4194304, 
> parent_ = 0xf18b38, 
> firstBlk_ = 0x7f3a44f75030, 
> allocSize_ = 1375405192, 
> upperLimit_ = 0, 
> highWaterMark_ = 1447646816, 
> intervalWaterMark_ = 1447646816, 
> allocCnt_ = 2837663, 
> totalSize_ = 1529356096, 
> blockCnt_ = 381, 
> thBlockCnt_ = 40, 
> segGlobals_ = 0x0, 
> memoryList_ = 0x7fdfb0e7aac0, 
> lastListEntry_ = 0x7fdeef140608, 
> nextEntry_ = 

[jira] [Created] (TRAFODION-2853) Memory leak of ComDiagsArea in Context

2017-12-18 Thread Selvaganesan Govindarajan (JIRA)
Selvaganesan Govindarajan created TRAFODION-2853:


 Summary: Memory leak of ComDiagsArea in Context
 Key: TRAFODION-2853
 URL: https://issues.apache.org/jira/browse/TRAFODION-2853
 Project: Apache Trafodion
  Issue Type: Bug
  Components: sql-exe
Affects Versions: any
Reporter: Selvaganesan Govindarajan
Assignee: Selvaganesan Govindarajan
 Fix For: 2.3-incubating


There were instances that the executor master process has more than 1 GB of 
memory account memory allocated, Looking at the size of allocation by 
traversing the heap, it was found ComDiagsArea is leaked in ContextHeap.

The heap traversal shows the addresses and the allocated size that were part of 
context Heap that was leaking

0x7fdef4cc69b8 336
0x7fdef4cc6bc8 336
0x7fdef4cc6d18 336
0x7fdef4cc6e68 336
0x7fdef4cc6fb8 336
0x7fdef4cc71e0 336
0x7fdef4cc7330 336
0x7fdef4cc7480 336

The actual address of the objects is 16 bytes from the above address

(gdb) p *(ComDiagsArea *)0x7fdef4cc69c8  
$9 = {
   = {
_vptr.IpcMessageObj = 0x7fdfbe4bbc50, 
s_ = {
  objType_ = 13501, 
  objVersion_ = 0, 
  refCount_ = 1, 
  objLength_ = 0, 
  next_ = 0x0, 
  endianness_ = 1 '\001', 
  spare1_ = 0 '\000', 
  spare2_ = 0, 
  vPtrPad_ = 0x0
}
  }, 
  members of ComDiagsArea: 
  collHeapPtr_ = 0x7fdfb18eb128, 
  errors_ = {
> = {
   = {
_vptr.NABasicObject = 0x7fdfbe4bbf10, 
h_ = 0x0
  }, 
  members of NACollection: 
  maxLength_ = 0, 
  usedLength_ = 0, 
  entries_ = 0, 
  arr_ = 0x0, 
  usages_ = 0x0, 
  heap_ = 0x7fdfb18eb128
}, 
members of NAList: 
first_ = 1, 
last_ = 1, 
userIndexCache_ = 1, 
arrayIndexCache_ = 1
  }, 
  warnings_ = {
---Type  to continue, or q  to quit---
> = {
   = {
_vptr.NABasicObject = 0x7fdfbe4bbf10, 
h_ = 0x0
  }, 
  members of NACollection: 
  maxLength_ = 0, 
  usedLength_ = 0, 
  entries_ = 0, 
  arr_ = 0x0, 
  usages_ = 0x0, 
  heap_ = 0x7fdfb18eb128
}, 
members of NAList: 
first_ = 1, 
last_ = 1, 
userIndexCache_ = 1, 
arrayIndexCache_ = 1
  }, 
  newCondition_ = 0x0, 
  areMore_ = 0, 
  lengthLimit_ = 30, 
  rowCount_ = 0, 
  theSQLFunction_ = 0, 
  maxDiagsId_ = 0, 
  avgStreamWaitTime_ = -1, 
  cost_ = 0, 
  flags_ = 0, 
  rowsetRowCountArray_ = 0x0, 
  fillers_ = '\000' 
}

(gdb) (gdb) p *(NAHeap *)0x7fdfb18eb128
$10 = {
   = {
 = {
  _vptr.NABasicObject = 0x7fdfc1001870, 
  h_ = 0x0
}, 
members of NAMemory: 
name_ = "Heap in ContextCli\000\000", 
type_ = NAMemory::DERIVED_MEMORY, 
initialSize_ = 524288, 
maximumSize_ = 18446744073709551615, 
incrementSize_ = 4194304, 
parent_ = 0xf18b38, 
firstBlk_ = 0x7f3a44f75030, 
allocSize_ = 1375405192, 
upperLimit_ = 0, 
highWaterMark_ = 1447646816, 
intervalWaterMark_ = 1447646816, 
allocCnt_ = 2837663, 
totalSize_ = 1529356096, 
blockCnt_ = 381, 
thBlockCnt_ = 40, 
segGlobals_ = 0x0, 
memoryList_ = 0x7fdfb0e7aac0, 
lastListEntry_ = 0x7fdeef140608, 
nextEntry_ = 0x7fdfb18f12c8, 
debugLevel_ = 0, 
heapJumpBuf_ = 0xf18a30, 
exhaustedMem_ = 0, 
errorsMask_ = 0, 
heapID_ = {
  heapNum = -1
}, 




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Work started] (TRAFODION-2852) Update Messages Guide for some messages in the range 1200-1299

2017-12-18 Thread David Wayne Birdsall (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TRAFODION-2852 started by David Wayne Birdsall.
---
> Update Messages Guide for some messages in the range 1200-1299
> --
>
> Key: TRAFODION-2852
> URL: https://issues.apache.org/jira/browse/TRAFODION-2852
> Project: Apache Trafodion
>  Issue Type: Sub-task
>  Components: documentation
>Reporter: David Wayne Birdsall
>Assignee: David Wayne Birdsall
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2398) Update Messages Guide for some messages from 1100-1199

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295500#comment-16295500
 ] 

ASF GitHub Bot commented on TRAFODION-2398:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/1352


> Update Messages Guide for some messages from 1100-1199
> --
>
> Key: TRAFODION-2398
> URL: https://issues.apache.org/jira/browse/TRAFODION-2398
> Project: Apache Trafodion
>  Issue Type: Sub-task
>  Components: documentation
>Affects Versions: 2.1-incubating
>Reporter: David Wayne Birdsall
>Assignee: David Wayne Birdsall
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (TRAFODION-2851) Update Messages Guide for some messages in the range 1200-1299

2017-12-18 Thread David Wayne Birdsall (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wayne Birdsall closed TRAFODION-2851.
---
Resolution: Fixed

Tried to make this a subtask of 2283 but got it wrong. Created another JIRA for 
this once I figured out how to create a subtask.

> Update Messages Guide for some messages in the range 1200-1299
> --
>
> Key: TRAFODION-2851
> URL: https://issues.apache.org/jira/browse/TRAFODION-2851
> Project: Apache Trafodion
>  Issue Type: Task
>Reporter: David Wayne Birdsall
>Assignee: David Wayne Birdsall
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TRAFODION-2852) Update Messages Guide for some messages in the range 1200-1299

2017-12-18 Thread David Wayne Birdsall (JIRA)
David Wayne Birdsall created TRAFODION-2852:
---

 Summary: Update Messages Guide for some messages in the range 
1200-1299
 Key: TRAFODION-2852
 URL: https://issues.apache.org/jira/browse/TRAFODION-2852
 Project: Apache Trafodion
  Issue Type: Sub-task
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TRAFODION-2851) Update Messages Guide for some messages in the range 1200-1299

2017-12-18 Thread David Wayne Birdsall (JIRA)
David Wayne Birdsall created TRAFODION-2851:
---

 Summary: Update Messages Guide for some messages in the range 
1200-1299
 Key: TRAFODION-2851
 URL: https://issues.apache.org/jira/browse/TRAFODION-2851
 Project: Apache Trafodion
  Issue Type: Task
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2845) Correct the syntax descriptions of LOAD Statement for *Trafodion SQL Reference Manual*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295236#comment-16295236
 ] 

ASF GitHub Bot commented on TRAFODION-2845:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/1346


> Correct the syntax descriptions of LOAD Statement for *Trafodion SQL 
> Reference Manual*
> --
>
> Key: TRAFODION-2845
> URL: https://issues.apache.org/jira/browse/TRAFODION-2845
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2842) Correct the description of connectionTimeout in *Trafodion JDBC Type 4 Programmer’s Reference Guide*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295232#comment-16295232
 ] 

ASF GitHub Bot commented on TRAFODION-2842:
---

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/1339


> Correct the description of connectionTimeout in *Trafodion JDBC Type 4 
> Programmer’s Reference Guide*
> 
>
> Key: TRAFODION-2842
> URL: https://issues.apache.org/jira/browse/TRAFODION-2842
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TRAFODION-2850) Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for *Trafodion SQL Large Objects Guide*

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-2850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294634#comment-16294634
 ] 

ASF GitHub Bot commented on TRAFODION-2850:
---

GitHub user liuyu000 opened a pull request:

https://github.com/apache/incubator-trafodion/pull/1354

[TRAFODION-2850] Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for 
*Trafodion SQL Large Objects Guide*



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

$ git pull https://github.com/liuyu000/incubator-trafodion 
Note_for_EMPTYBLOB

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

https://github.com/apache/incubator-trafodion/pull/1354.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 #1354


commit 083fcb020e53ec0fb4e198059a866c34831e62e3
Author: liu.yu 
Date:   2017-12-18T08:08:57Z

Add a Note for EMPTY_BLOB() and EMPTY_CLOB()




> Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for *Trafodion SQL Large Objects 
> Guide*
> 
>
> Key: TRAFODION-2850
> URL: https://issues.apache.org/jira/browse/TRAFODION-2850
> Project: Apache Trafodion
>  Issue Type: Documentation
>Reporter: Liu Yu
>Assignee: Liu Yu
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TRAFODION-2850) Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for *Trafodion SQL Large Objects Guide*

2017-12-18 Thread Liu Yu (JIRA)
Liu Yu created TRAFODION-2850:
-

 Summary: Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for 
*Trafodion SQL Large Objects Guide*
 Key: TRAFODION-2850
 URL: https://issues.apache.org/jira/browse/TRAFODION-2850
 Project: Apache Trafodion
  Issue Type: Documentation
Reporter: Liu Yu
Assignee: Liu Yu






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)