views:

51

answers:

1

According to the GQL reference,

GQL does not have an OR operator. However, it does have an IN operator, which provides a limited form of OR.

I know this wasn't implemented for some good reason, but I'm wondering what could be that reason.

+1  A: 

In Bigtable, as with any other database, an 'OR' query more or less equates to doing multiple queries, and merging the results. Since the datastore strives not to hide work (eg, doing expensive things interchangeably with cheap things), it leaves it to you to do this, at least for now.

Two things may change this in the near future: support for asynchronous queries will mean that it'll be possible to implement this support in the SDK (by executing and merging multiple queries in the background) similar to how IN queries are executed, and the work by Alfred Fuller and the datastore team on next generation queries will provide first-class support for more complex queries.

Nick Johnson