trafodion-codereview mailing list archives

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

    https://github.com/apache/incubator-trafodion/pull/1167#discussion_r126176560
  
    --- 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 --
    
    I think it's better to compare the CQD and this 'param'. If the param is larger, I will
use CQD, else use the param.  I will change it.


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