trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandhyasun <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1167: [TRAFODION-2308]JDBC support insert ...
Date Fri, 07 Jul 2017 19:05:24 GMT
Github user sandhyasun commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1167#discussion_r126222861
  
    --- Diff: core/sql/optimizer/BindItemExpr.cpp ---
    @@ -6105,12 +6105,21 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
                   ItemExpr *newChild;
                   const NAType &desiredType = child(0)->getValueId().getType();
                   SQLBlob &lobType = (SQLBlob&)desiredType;
    -
    -              NAType * newType = new SQLBlob((CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024),

    +              short fs_datatype = child(0)->castToItemExpr()->getValueId().getType().getFSDatatype();
    +
    +              NAType * newType = NULL;
    +              if (fs_datatype == REC_CLOB) {
    +                  newType = new SQLClob((CmpCommon::getDefaultNumeric(LOB_MAX_SIZE) *
1024 * 1024),
    +                         lobType.getLobStorage(),
    +                         TRUE, FALSE, TRUE,
    +                         CmpCommon::getDefaultNumeric(LOB_BATCH_SIZE));
    +              }
    +              else {
    +              newType = new SQLBlob((CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024),
                                                  lobType.getLobStorage(), 
                                                  TRUE, FALSE, TRUE, 
    -                                             CmpCommon::getDefaultNumeric(LOB_MAX_CHUNK_MEM_SIZE)*1024*1024);

    -              //              vid1.coerceType(desiredType, NA_LOB_TYPE); 
    +                                             CmpCommon::getDefaultNumeric(LOB_BATCH_SIZE));
    +              }
    --- End diff --
    
    But will this batch size affect non-batch inputs too ? For eg, if a statement is like
" insert into tlob values (1,?) "    Then the data passed in for ? should not be limited to
4096 for the non batch cases. Can you test and make sure of that ?


---
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.
---

Mime
View raw message