You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by ryzuo <gi...@git.apache.org> on 2015/11/16 07:18:59 UTC

[GitHub] incubator-trafodion pull request: [TRAFODION-1628] Implement T2 Dr...

GitHub user ryzuo opened a pull request:

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

    [TRAFODION-1628] Implement T2 Driver's Rowsets ability to enhance the batch insert performance

    This is the implementation of T2 Driver rowsets ability of batch insert and fetch as well. Includes Interface, functionality and method changes as below:
    1. Add the interface code for communication between JAVA
    and native via protocol buffer.
    2. Overload the PREPARE/EXUECUTE functions of native code to
    implement rowsets functionality.
    3. Rewrite/overload the PREPARE/EXECUTE/FETCH code of JAVA
    PreparedStatement class.

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

    $ git pull https://github.com/ryzuo/incubator-trafodion t2rsc

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

    https://github.com/apache/incubator-trafodion/pull/177.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 #177
    
----
commit c90207b66d21d89898d13c6fbebe1b365d28ef4a
Author: zuor <zu...@esgvm-7.novalocal>
Date:   2015-10-26T03:51:56Z

    T2 Rowsets Implementation:
    
    1. Add the interface code for communication between JAVA
    and native via protocol buffer.
    2. Overload the PREPARE/EXUECUTE functions of native code to
    implement rowsets functionality.
    3. Rewrite/overload the PREPARE/EXECUTE/FETCH code of JAVA
    PreparedStatement class.

commit 106981084dd7b8758b477d34f5f67a742187dc01
Author: ryzuo <jo...@gmail.com>
Date:   2015-10-26T09:20:28Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit ed7288e0673d96d2a092d7d712ca397fd0a0c382
Author: ryzuo <jo...@gmail.com>
Date:   2015-10-27T04:38:56Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit 558869ff6f2cee78b826b7d878213d164557d242
Author: zuor <zu...@esgvm-7.novalocal>
Date:   2015-10-26T03:51:56Z

    T2 Rowsets Implementation:
    
    1. Add the interface code for communication between JAVA
    and native via protocol buffer.
    2. Overload the PREPARE/EXUECUTE functions of native code to
    implement rowsets functionality.
    3. Rewrite/overload the PREPARE/EXECUTE/FETCH code of JAVA
    PreparedStatement class.

commit 704bdbc464f3d54c306657704c3d0e7d4048b8c0
Author: ryzuo <jo...@gmail.com>
Date:   2015-10-30T08:25:14Z

    Merge branch 't2rsc' of https://github.com/ryzuo/incubator-trafodion into t2rsc
    
    Conflicts:

commit cac891dc828ca57f96a37bb84b1b0f635fb312f5
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-03T02:36:36Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit 066e15f52b35e62d4a025b4e973421c38bc1a446
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-03T05:23:57Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit 7cbab1b9afbadb48488dc0e957e9a2059ac706a7
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-03T09:48:30Z

    Add initialization of some statement members.

commit c872edcdc08bd89a880193b368a6104839bed0a6
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-09T04:35:41Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit f22655c4cc81ee77dc81439ec1124a9c2efb614a
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-10T02:55:01Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit ee05b2cec49bfee444ede621237a94617eefe77a
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-13T05:36:44Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit 3e23feb0d37387d12a363d0f5468284d4934a7dd
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-16T04:11:09Z

    Merge branch 'master' of https://github.com/apache/incubator-trafodion into t2rsc

commit f9318e817b5e42c818dd16c60bde577e671a3898
Author: ryzuo <jo...@gmail.com>
Date:   2015-11-16T04:13:18Z

    T2 Rowsets Implementation.
    
    1. Fixed double free of sqlWarningOrError.
    2. Deleted some unsed functions and comments.
    3. Changed some function return/exit statements to use the
       consistent macro definition(which has debugging and error handling).

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFODION-1628] Implement T2 Dr...

Posted by ryzuo <gi...@git.apache.org>.
Github user ryzuo commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/177#discussion_r45025331
  
    --- Diff: core/conn/jdbc_type2/native/CSrvrStmt.cpp ---
    @@ -180,12 +241,88 @@ SQLRETURN SRVR_STMT_HDL::Prepare(const SQLValue_def *inSqlString, short inStmtTy
     
         strncpy((char *)sqlString.dataValue._buffer, (const char *)inSqlString->dataValue._buffer, inSqlString->dataValue._length);
         sqlString.dataValue._buffer[inSqlString->dataValue._length] = '\0';
    +
    +    sqlStringLen = inSqlString->dataValue._length;
    +    MEMORY_ALLOC_ARRAY(sqlStringText, char, sqlStringLen+1);
    +    strncpy((char *)sqlStringText, (const char *)inSqlString->dataValue._buffer, sqlStringLen);
    +    sqlStringText[inSqlString->dataValue._length] = '\0';
    +
         stmtType = inStmtType;
         holdability = inHoldability;
     
         CLI_DEBUG_RETURN_SQL(PREPARE(this));
     }
     
    +SQLRETURN SRVR_STMT_HDL::Execute(const char *inCursorName, IDL_long inInputRowCnt, IDL_short inSqlStmtType, 
    +        const SQLValueList_def *inValueList, 
    +        short inSqlAsyncEnable, Int32 inQueryTimeout)
    +{
    --- End diff --
    
    Hi Selva,
    They are different actually, if you look at it carefully, the one below has one more argument SQLValueList_def *outValueList, they are overloaded functions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFODION-1628] Implement T2 Dr...

Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/177#discussion_r45075811
  
    --- Diff: core/conn/jdbc_type2/native/CSrvrStmt.cpp ---
    @@ -180,12 +241,88 @@ SQLRETURN SRVR_STMT_HDL::Prepare(const SQLValue_def *inSqlString, short inStmtTy
     
         strncpy((char *)sqlString.dataValue._buffer, (const char *)inSqlString->dataValue._buffer, inSqlString->dataValue._length);
         sqlString.dataValue._buffer[inSqlString->dataValue._length] = '\0';
    +
    +    sqlStringLen = inSqlString->dataValue._length;
    +    MEMORY_ALLOC_ARRAY(sqlStringText, char, sqlStringLen+1);
    +    strncpy((char *)sqlStringText, (const char *)inSqlString->dataValue._buffer, sqlStringLen);
    +    sqlStringText[inSqlString->dataValue._length] = '\0';
    +
         stmtType = inStmtType;
         holdability = inHoldability;
     
         CLI_DEBUG_RETURN_SQL(PREPARE(this));
     }
     
    +SQLRETURN SRVR_STMT_HDL::Execute(const char *inCursorName, IDL_long inInputRowCnt, IDL_short inSqlStmtType, 
    +        const SQLValueList_def *inValueList, 
    +        short inSqlAsyncEnable, Int32 inQueryTimeout)
    +{
    --- End diff --
    
    Thanks. It is my bad. I forgot to expand the hidden lines.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFODION-1628] Implement T2 Dr...

Posted by ryzuo <gi...@git.apache.org>.
Github user ryzuo commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/177#discussion_r45578267
  
    --- Diff: core/conn/jdbc_type2/native/CSrvrStmt.cpp ---
    @@ -341,7 +479,7 @@ SQLRETURN SRVR_STMT_HDL::Close(unsigned short inFreeResourceOpt)
         SQLRETURN rc;
     
         if (stmtType == INTERNAL_STMT) CLI_DEBUG_RETURN_SQL(SQL_SUCCESS);
    -    cleanupSQLMessage();
    +    //cleanupSQLMessage();
    --- End diff --
    
    Sorry, this is not on purpose, I will uncomment this within an updates along with some other changes of the memory allocation/release management code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: [TRAFODION-1628] Implement T2 Dr...

Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/177#discussion_r44963171
  
    --- Diff: core/conn/jdbc_type2/native/CSrvrStmt.cpp ---
    @@ -180,12 +241,88 @@ SQLRETURN SRVR_STMT_HDL::Prepare(const SQLValue_def *inSqlString, short inStmtTy
     
         strncpy((char *)sqlString.dataValue._buffer, (const char *)inSqlString->dataValue._buffer, inSqlString->dataValue._length);
         sqlString.dataValue._buffer[inSqlString->dataValue._length] = '\0';
    +
    +    sqlStringLen = inSqlString->dataValue._length;
    +    MEMORY_ALLOC_ARRAY(sqlStringText, char, sqlStringLen+1);
    +    strncpy((char *)sqlStringText, (const char *)inSqlString->dataValue._buffer, sqlStringLen);
    +    sqlStringText[inSqlString->dataValue._length] = '\0';
    +
         stmtType = inStmtType;
         holdability = inHoldability;
     
         CLI_DEBUG_RETURN_SQL(PREPARE(this));
     }
     
    +SQLRETURN SRVR_STMT_HDL::Execute(const char *inCursorName, IDL_long inInputRowCnt, IDL_short inSqlStmtType, 
    +        const SQLValueList_def *inValueList, 
    +        short inSqlAsyncEnable, Int32 inQueryTimeout)
    +{
    --- End diff --
    
    The method signature of this method and the one below looks same. If so, it is not clear how the compiler decides to resolve this method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request #177: [TRAFODION-1628] Implement T2 Driver'...

Posted by ryzuo <gi...@git.apache.org>.
Github user ryzuo closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---