You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2017/07/31 05:41:54 UTC
[5/7] incubator-trafodion git commit: rename LOB_BATCH_SIZE to
LOB_INPUT_LIMIT_FOR_BATCH
rename LOB_BATCH_SIZE to LOB_INPUT_LIMIT_FOR_BATCH
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/dc5b1370
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/dc5b1370
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/dc5b1370
Branch: refs/heads/master
Commit: dc5b13707cae1514c6f62267077676af76c75624
Parents: e762add
Author: Weiqing Xu <we...@esgyn.cn>
Authored: Thu Jul 27 08:35:13 2017 +0000
Committer: Weiqing Xu <we...@esgyn.cn>
Committed: Thu Jul 27 12:23:39 2017 +0000
----------------------------------------------------------------------
core/sql/optimizer/BindItemExpr.cpp | 7 +++++--
core/sql/sqlcomp/DefaultConstants.h | 2 +-
core/sql/sqlcomp/nadefaults.cpp | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/dc5b1370/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index b2ea152..78201f4 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -6108,17 +6108,20 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
short fs_datatype = child(0)->castToItemExpr()->getValueId().getType().getFSDatatype();
NAType * newType = NULL;
+
+ double lob_input_limit_for_batch = CmpCommon::getDefaultNumeric(LOB_INPUT_LIMIT_FOR_BATCH);
+ double lob_size = lobType.getLobLength();
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));
+ lob_input_limit_for_batch > lob_size ? lob_input_limit_for_batch : lob_size);
}
else {
newType = new SQLBlob((CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024),
lobType.getLobStorage(),
TRUE, FALSE, TRUE,
- CmpCommon::getDefaultNumeric(LOB_BATCH_SIZE));
+ lob_input_limit_for_batch > lob_size ? lob_input_limit_for_batch : lob_size);
}
vid1.coerceType(*newType, NA_LOB_TYPE);
if (bindWA->getCurrentScope()->context()->inUpdate())
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/dc5b1370/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 44313bf..c702cf7 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -3271,7 +3271,7 @@ enum DefaultConstants
LOB_HDFS_PORT,
LOB_GC_LIMIT_SIZE,
- LOB_BATCH_SIZE,
+ LOB_INPUT_LIMIT_FOR_BATCH,
// Should the DISK POOL be turned on when replicating the DDL using COPY DDL
REPLICATE_DISK_POOL,
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/dc5b1370/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index 92fafdc..2e81a21 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -2075,7 +2075,6 @@ SDDkwd__(ISO_MAPPING, (char *)SQLCHARSETSTRING_ISO88591),
// precision but degraded performance.
SDDkwd__(LIMIT_MAX_NUMERIC_PRECISION, "SYSTEM"),
- DDint__(LOB_BATCH_SIZE, "4096"),
// Size in bytes used to perform garbage collection to lob data file
// default size is 5GB . Change to adjust disk usage. If 0 it means
// don't do GC
@@ -2084,6 +2083,7 @@ SDDkwd__(ISO_MAPPING, (char *)SQLCHARSETSTRING_ISO88591),
DDint__(LOB_HDFS_PORT, "0"),
DD_____(LOB_HDFS_SERVER, "default"),
+ DDint__(LOB_INPUT_LIMIT_FOR_BATCH, "4096"),
// Size of memoryin Megabytes used to perform I/O to lob data file
// default size is 512MB . Change to adjust memory usage.
DDint__(LOB_MAX_CHUNK_MEM_SIZE, "512"),