public ColumnStatisticsObj(string colName, string colType, ColumnStatisticsData statsData)
     : this()
 {
     this.ColName   = colName;
     this.ColType   = colType;
     this.StatsData = statsData;
 }
        public void Read(TProtocol iprot)
        {
            bool   isset_colName   = false;
            bool   isset_colType   = false;
            bool   isset_statsData = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        ColName       = iprot.ReadString();
                        isset_colName = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        ColType       = iprot.ReadString();
                        isset_colType = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        StatsData = new ColumnStatisticsData();
                        StatsData.Read(iprot);
                        isset_statsData = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_colName)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_colType)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_statsData)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }