コード例 #1
0
        public void Read(TProtocol iprot)
        {
            bool   isset_statsDesc = false;
            bool   isset_statsObj  = 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.Struct)
                    {
                        StatsDesc = new ColumnStatisticsDesc();
                        StatsDesc.Read(iprot);
                        isset_statsDesc = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            StatsObj = new List <ColumnStatisticsObj>();
                            TList _list110 = iprot.ReadListBegin();
                            for (int _i111 = 0; _i111 < _list110.Count; ++_i111)
                            {
                                ColumnStatisticsObj _elem112 = new ColumnStatisticsObj();
                                _elem112 = new ColumnStatisticsObj();
                                _elem112.Read(iprot);
                                StatsObj.Add(_elem112);
                            }
                            iprot.ReadListEnd();
                        }
                        isset_statsObj = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_statsDesc)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_statsObj)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
コード例 #2
0
 public ColumnStatistics(ColumnStatisticsDesc statsDesc, List <ColumnStatisticsObj> statsObj) : this()
 {
     this.StatsDesc = statsDesc;
     this.StatsObj  = statsObj;
 }