[ https://issues.apache.org/jira/browse/TRAFODION-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404277#comment-15404277 ]
ASF GitHub Bot commented on TRAFODION-2119: ------------------------------------------- Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/633#discussion_r73186399 --- Diff: core/sql/optimizer/EncodedKeyValue.cpp --- @@ -66,15 +66,22 @@ NAString * getMinMaxValue(desc_struct * column, if (NAColumn::createNAType(&column->body.columns_desc, NULL, type, NULL)) return NULL; - Lng32 buflen = type->getTotalSize(); + Lng32 buflen = type->getTotalSize(); char * buf = new char[buflen]; // deleted at the end of this method + if (type->supportsSQLnullPhysical()) + { + Lng32 nullHdrSize = type->getSQLnullHdrSize(); + buf[0] = buf[1] = '\0'; --- End diff -- Seems like the code should zero out nullHdrSize bytes (for example, one can use memset, or alternatively a loop). > create table report strange WARNING when using store by and > allow_nullable_unique_key_constraint CQD > ---------------------------------------------------------------------------------------------------- > > Key: TRAFODION-2119 > URL: https://issues.apache.org/jira/browse/TRAFODION-2119 > Project: Apache Trafodion > Issue Type: Bug > Reporter: liu ming > Assignee: liu ming > > cqd allow_nullable_unique_key_constraint 'on' ; > create table T_RH_DZSP > ( > s_orgcode CHAR(12) character set utf8, > s_applydate CHAR(8) character set utf8, > s_packno varchar(8) character set utf8, > s_trecode CHAR(10) character set utf8, > s_trename varchar(60) character set utf8, > s_taxorgcode varchar(12) character set utf8, > s_paybnkno varchar(12) character set utf8, > s_trano varchar(8) character set utf8, > s_orimsgno CHAR(4) character set utf8, > f_traamt numeric(18,2), > s_payeropnbnkno varchar(12) character set utf8, > payeropbkname varchar(60) character set utf8, > s_handorgname varchar(200) character set utf8, > s_payacct varchar(32) character set utf8, > s_taxvouno varchar(20) character set utf8, > s_billdate CHAR(8) character set utf8, > s_taxpaycode varchar(20) character set utf8, > s_taxpayname varchar(200) character set utf8, > c_budgettype CHAR(1) character set utf8, > c_trimflag CHAR(1) character set utf8, > s_etpcode varchar(20) character set utf8, > s_etpname varchar(200) character set utf8, > s_etptype varchar(20) character set utf8, > s_bdgsbtcode varchar(30) character set utf8, > s_bdgsbtname varchar(60) character set utf8, > s_limit CHAR(8) character set utf8, > s_taxtypecode CHAR(10) character set utf8, > s_taxkindname varchar(60) character set utf8, > c_bdglevel CHAR(1) character set utf8, > c_bdglevelname varchar(60) character set utf8, > s_taxstartdate CHAR(8) character set utf8, > s_taxenddate CHAR(8) character set utf8, > s_astflag varchar(35) character set utf8, > c_taxtype CHAR(1) character set utf8, > s_acct CHAR(8) character set utf8, > s_trastate CHAR(2) character set utf8, > s_remark varchar(60) character set utf8, > s_remark1 varchar(60) character set utf8, > s_remark2 varchar(60) character set utf8, > s_inputerid varchar(18) character set utf8, > ts_sysupdate varchar(100) character set utf8, > s_seq varchar(100) character set utf8 > ) > store by (S_APPLYDATE) > salt using 48 partitions on (S_APPLYDATE) > ATTRIBUTES ALIGNED FORMAT > HBASE_OPTIONS > ( > DATA_BLOCK_ENCODING = 'FAST_DIFF', > -- COMPRESSION = 'SNAPPY', > MEMSTORE_FLUSH_SIZE = '1073741824' > ); > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > *** WARNING[8402] A string overflow occurred during the evaluation of a > character expression. > --- SQL operation complete. > >> -- This message was sent by Atlassian JIRA (v6.3.4#6332)