keenlabs / keen-sdk-net

A .NET SDK for the Keen IO API
MIT License
37 stars 23 forks source link

QueryFilter.FilterOperator.Equals() with null value #23

Closed dietert closed 7 years ago

dietert commented 8 years ago

Hi,

I want to check if a property is null.

I'll do this with the following code

new QueryFilter("propertyname", QueryFilter.FilterOperator.Equals(), null)

But it throws an ArgumentNullException

Should I build my filter different? Or is my code correct and shouldn't the library throwing the ArgumentNullException?

Thanks for your answer!

Regards, Dieter

masojus commented 7 years ago

Just taking a look at the behavior here, and since the API does allow for a given property to be null and pass an exists filter with a value of true, and of course a property can have the string value 'null' there is a meaningful distinction here that needs to be addressed. The Java SDK has this same bug, I believe.

masojus commented 7 years ago

Fixed in commit 60a31f3