I have 2 PRs (Customers & Contacts) and I am running a query to find all
customers with contact information.  I have collocated both Customers and
Contacts.  Initially, I tried to run the query outside a GemFire Function,
which failed with...

java.lang.UnsupportedOperationException: *A query on a Partitioned Region (
Customers ) may not reference any other region if query is NOT executed
within a Function*
at
com.gemstone.gemfire.cache.query.internal.DefaultQuery.checkQueryOnPR(DefaultQuery.java:638)
at
com.gemstone.gemfire.cache.query.internal.DefaultQuery.execute(DefaultQuery.java:351)
at
org.springframework.data.gemfire.GemfireTemplate.find(GemfireTemplate.java:299)

So, then I proceeded to attempt to execute my query...

SELECT DISTINCT customer
FROM /Customers customer, /Contacts contact"
WHERE customer.firstName = contact.person.firstName
AND customer.lastName = contact.person.lastName

... in a Function as instructed, however, I ended up with the same
Exception.

I am trying to figure out how to properly execute a JOIN on 2 "collocated"
PRs from within a Function, given the FunctionContext (or possibly the
local data set of the PR using RegionFunctionContext.getDataSet(), or
something like that).

Any help is appreciated.

Thanks,

-John

Reply via email to