private void Describe(Key key)
        {
            Exp index = Exp.Val(0);

            policy.filterExp = Exp.Build(
                Exp.NE(
                    ListExp.GetByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.Describe(Exp.HLLBin(bin1))),
                    ListExp.GetByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.Describe(Exp.HLLBin(bin2)))));

            Record r = client.Get(policy, key);

            Assert.AreEqual(null, r);

            policy.filterExp = Exp.Build(
                Exp.EQ(
                    ListExp.GetByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.Describe(Exp.HLLBin(bin1))),
                    ListExp.GetByIndex(ListReturnType.VALUE, Exp.Type.INT, index, HLLExp.Describe(Exp.HLLBin(bin2)))));

            r = client.Get(policy, key);
            AssertRecordFound(key, r);
        }
        public void QueryList3()
        {
            int begin = 1;
            int end   = 10;

            Statement stmt = new Statement();

            stmt.SetNamespace(args.ns);
            stmt.SetSetName(setName);
            stmt.SetFilter(Filter.Range(binName, begin, end));

            // list[4] == 20
            QueryPolicy policy = new QueryPolicy();

            policy.filterExp = Exp.Build(
                Exp.EQ(
                    ListExp.GetByIndex(ListReturnType.VALUE, Exp.Type.INT, Exp.Val(4), Exp.ListBin("listbin")),
                    Exp.Val(20)));

            RecordSet rs = client.Query(policy, stmt);

            try
            {
                int count = 0;

                while (rs.Next())
                {
                    //Console.WriteLine(rs.Record.ToString());
                    count++;
                }
                Assert.AreEqual(1, count);
            }
            finally
            {
                rs.Close();
            }
        }