Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

SQL join with abstract classes

I'm using GS 6.5 M9 and get error messages like: "java.sql.SQLException: Select failed -1" and "java.sql.SQLException: Select failed null". What I need GS to do is to join two abstract classes and give me ResultSet but it seems impossible to do with GS 6.5 M9. Seems that I can only select variables from leaf node classes in my class hierarchy tree.

Example: "SELECT A.a FROM A, B WHERE A.a = B.aRef" fails (when there is at least one instance of AA in space) whereas query "SELECT AA.a FROM AA, B WHERE AA.a = B.aRef" succeeds.

Same way: "select AA.a, B.b from AA, B where AA.a = B.aRef" fails whereas "select AA.a, BB.b from AA, BB where AA.a = BB.aRef" succeeds

class A { Integer a; }

class AA extends A { Integer aa; }

class B { Integer b; Integer aRef; }

class BB extends B { }

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=1887]{quote}

asked 2008-05-05 07:21:55 -0500

kaarelk gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted


It is not recommended performing such joins. The cost of such join is relatively large when dealing with large data sets.

Can't you have within the space a Class consolidating data from classes AA and B?

If you queries involves large data set , you might want to perform these from within a business logic co-located with the space and invoke these using the remoting interface. This will avoid passing the result set over the wire and will speed up the overall performance and footprint require to process the query.

If you are looking for such example let me know.


answered 2008-05-05 18:47:02 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2008-05-05 07:21:55 -0500

Seen: 87 times

Last updated: May 05 '08