[ 
https://issues.apache.org/jira/browse/HAWQ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15816785#comment-15816785
 ] 

ASF GitHub Bot commented on HAWQ-1252:
--------------------------------------

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

    https://github.com/apache/incubator-hawq-docs/pull/83#discussion_r95497019
  
    --- Diff: markdown/plext/using_pljava.html.md.erb ---
    @@ -2,205 +2,222 @@
     title: Using PL/Java
     ---
     
    -This section contains an overview of the HAWQ PL/Java language. 
    +This section provides an overview of the HAWQ PL/Java procedural language 
extension. 
     
     
     ## <a id="aboutpljava"></a>About PL/Java 
     
    -With the HAWQ PL/Java extension, you can write Java methods using your 
favorite Java IDE and install the JAR files that implement the methods in your 
HAWQ cluster.
    +With the PL/Java extension, you can write Java methods using your favorite 
Java IDE and invoke the methods from PostgreSQL user-defined functions (UDFs). 
     
    -**Note**: If building HAWQ from source, you must specify PL/Java as a 
build option when compiling HAWQ. To use PL/Java in a HAWQ deployment, you must 
explicitly enable the PL/Java extension in all desired databases.  
    +The HAWQ PL/Java package is based on the open source PL/Java 1.4.0 and 
provides the following features:
     
    -The HAWQ PL/Java package is based on the open source PL/Java 1.4.0. HAWQ 
PL/Java provides the following features.
    -
    -- Ability to execute PL/Java functions with Java 1.6 or 1.7.
    -- Standardized utilities (modeled after the SQL 2003 proposal) to install 
and maintain Java code in the database.
    -- Standardized mappings of parameters and result. Complex types as well as 
sets are supported.
    -- An embedded, high performance, JDBC driver utilizing the internal HAWQ 
Database SPI routines.
    +- PL/Java function execution with Java 1.6 or 1.7.
    +- Standardized mappings of Java and PostgreSQL parameters and results. 
Complex types as well as sets are supported.
    +- Two HAWQ Java languages:
    +   - `java` - Tusted PL/Java language
    +   - `javau` - Untrusted PL/Java language (superusers only)
    +- An embedded, high performance, JDBC driver utilizing the internal HAWQ 
Database Server Programming Interface (SPI).
     - Metadata support for the JDBC driver. Both `DatabaseMetaData` and 
`ResultSetMetaData` are included.
    -- The ability to return a `ResultSet` from a query as an alternative to 
building a ResultSet row by row.
    +- A standard way of passing parameters and return values. Complex types 
and sets are passed using the standard JDBC `ResultSet` class.
    +- The ability to return a `ResultSet` from a query as an alternative to 
building a `ResultSet` row by row.
     - Full support for savepoints and exception handling.
    -- The ability to use IN, INOUT, and OUT parameters.
    -- Two separate HAWQ languages:
    -   - pljava, TRUSTED PL/Java language
    -   - pljavau, UNTRUSTED PL/Java language
     - Transaction and Savepoint listeners enabling code execution when a 
transaction or savepoint is committed or rolled back.
     - Integration with GNU GCJ on selected platforms.
     
    -A function in SQL will appoint a static method in a Java class. In order 
for the function to execute, the appointed class must available on the class 
path specified by the HAWQ server configuration parameter `pljava_classpath`. 
The PL/Java extension adds a set of functions that helps to install and 
maintain the Java classes. Classes are stored in normal Java archives, JAR 
files. A JAR file can optionally contain a deployment descriptor that in turn 
contains SQL commands to be executed when the JAR is deployed or undeployed. 
The functions are modeled after the standards proposed for SQL 2003.
    -
    -PL/Java implements a standard way of passing parameters and return values. 
Complex types and sets are passed using the standard JDBC ResultSet class.
    -
    -A JDBC driver is included in PL/Java. This driver calls HAWQ internal SPI 
routines. The driver is essential since it is common for functions to make 
calls back to the database to fetch data. When PL/Java functions fetch data, 
they must use the same transactional boundaries that are used by the main 
function that entered PL/Java execution context.
    +PL/Java is optimized for performance. The Java virtual machine executes 
within the same process as the backend, minimizing call overhead. PL/Java 
brings the power of Java to the database itself, enabling the 
database-intensive business logic to execute as close to the actual data as 
possible.
     
    -PL/Java is optimized for performance. The Java virtual machine executes 
within the same process as the backend to minimize call overhead. PL/Java is 
designed with the objective to enable the power of Java to the database itself 
so that database intensive business logic can execute as close to the actual 
data as possible.
    -
    -The standard Java Native Interface (JNI) is used when bridging calls 
between the backend and the Java VM.
    +Calls between the HAWQ backend and the Java VM are bridged using the 
standard Java Native Interface (JNI).
     
     
     ## <a id="abouthawqpljava"></a>About HAWQ PL/Java 
     
    +PL/Java is embedded in your HAWQ product distribution or within your HAWQ 
build if you chose to enable it as a build option. To use PL/Java in a HAWQ 
deployment, you must explicitly enable the PL/Java extension in all desired 
databases.
    +
     There are a few key differences between the implementation of PL/Java in 
standard PostgreSQL and HAWQ.
     
    -### <a id="pljavafunctions"></a>Functions 
    +### <a id="pljavafunctions"></a>Functions Not Supported
     
    -The following functions are not supported in HAWQ. The classpath is 
handled differently in a distributed HAWQ environment than in the PostgreSQL 
environment.
    +The following functions are not supported in HAWQ. The PL/Java classpath 
is handled differently in a distributed HAWQ environment than that of the 
PostgreSQL environment.
    --- End diff --
    
    I think the sentence beginning "The PL/Java classpath..." Should be moved 
to afte this function list.


> PL/Java doc page - validate and enhance info
> --------------------------------------------
>
>                 Key: HAWQ-1252
>                 URL: https://issues.apache.org/jira/browse/HAWQ-1252
>             Project: Apache HAWQ
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Lisa Owen
>            Assignee: David Yozie
>            Priority: Minor
>
> PL/Java docs section:
> - review and validate current content
> - make sure examples run and are relevant
> - develop new examples as appropriate



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to