trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zhenxingh commented on a change in pull request #1783: [TRAFODION-3259] Length of varchar exceeds 65536 insert data will fail
Date Fri, 01 Feb 2019 02:11:19 GMT
zhenxingh commented on a change in pull request #1783: [TRAFODION-3259] Length of varchar exceeds
65536 insert data will fail
URL: https://github.com/apache/trafodion/pull/1783#discussion_r252913541
 
 

 ##########
 File path: core/sql/exp/exp_attrs.h
 ##########
 @@ -759,9 +763,10 @@ class SimpleType : public Attributes
   Int16 getScale()            {return scale_;}
   UInt16 getScaleAsUI()       {return (UInt16)scale_;}
 
-  Int32 getPrecision()        {return (UInt16)precision_;} // Treat as UInt16 in case 0x8000
or bigger
+  Int32 getPrecision()
+  {return (UInt16)precision_ | ((UInt32)precision_high_ << 16);}
   inline void setPrecision(Int32 precision)
-                              {precision_ = (Int16)precision;}
+  {precision_ = (Int16)precision; precision_high_ = (Int16)((UInt32)precision >> 16);}
 
 Review comment:
   Good to know that, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message