Query has a different behavior if Filter is set or not?

Hi,

I’m using the C# driver version 3.6.3. (netstandard version)

This statement:

var N = 100;

var statement = new Statement
{
    Namespace = configuration.Namespace,
    SetName = configuration.MarketSetName,
    BinNames = new string[] { },
};

var recordset = Client.Query(null, statement);
while (recordset.Next() && N-- > 0)
    list.Add(recordset.Record);

returns N records with ALL the bins.

If I take one record and use the “Id” bin for filter it:

var Id = "myid"
var statement = new Statement
{
    Namespace = configuration.Namespace,
    SetName = configuration.MarketAuditSetName,
    BinNames = new string[] { },
    Filter = Filter.Equal( "Id", Id) returned!
};

var recordset = Client.Query(null, statement);
while (recordset.Next())
    list.Add(recordset.Record); 

I obtain NO RECORDS

In the second statement (the one where I apply a Filter) I have to pass a null collection of Bins (or not define it) to have the records!

Why the behavior of Query is different when I set the Filter ?

That is inconsistent. We will change behavior of query to return all bins if binName array is empty regardless of whether filter is defined in the next client release.