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

 ##########
 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:
   I would think it should be ok to change the precision to Int32 instead of 
keeping two different variables precision_ and precision_high_. Currently 
Trafodion doesn't support versioning. From this perspective, it is ok to change 
these structures which could be serialized across processes.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to