1

I noticed that Ignite seems to allow SQL querying (with SqlFieldsQuery) of a cache say cache A from a different cache say cache B's IgniteCache reference.

I can understand join queries, but shouldn't Ignite validate & fail execution of SQL queries that don't operate at all on the associated Ignite Cache (the IgniteCache reference/handle on which the query is being submitted for execution)? Or am I missing something?

Thanks

1 Answer 1

2

I think it's just a historical accident. There were options like ScanQuery and SqlQuery, neither of which support joins, so it would make sense to fire them at a specific table. Then the SQL engine was added and SqlFieldsQuery was added, and it inherits from Query so it (kind of) makes sense to also execute it against a table.

You'll notice that thin-clients have a query method at the top level rather than at the table level, and Ignite 3 has a top level ignite.sql(), so different choices were made when the option was available.

Sign up to request clarification or add additional context in comments.

4 Comments

Cool.....technically it results in a bug & should be fixed IMO, because there are cases where this results in subtle issues, I will list that out separately.
I know it impacts only thick clients...but nevertheless...at least we still use thick clients..
I'm not sure it's a bug. Sub-optimal API, maybe. Ignite is open source, so I'm sure the community would be happy to receive a patch.
Yes I agree, will follow up on this in the dev alias. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.