Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calcite engine do not return expected results in some cases #11941

Open
bgaraude opened this issue Mar 12, 2025 · 0 comments
Open

Calcite engine do not return expected results in some cases #11941

bgaraude opened this issue Mar 12, 2025 · 0 comments

Comments

@bgaraude
Copy link

I've tried to migrate from H2 to Calcite as SqlEngine on ignite 2.17.0

Some queries we do (either through jdbc or SqlFieldQuery) are returning empty result set when using Calcite.

This seem to happen when there are joins on key fields, and a where clause on the joined entity key field. It also seem to happen when the key types on the FROM and JOIN entity do not have the same field number.

You can find a small reproducer on this gist:
https://gist.github.com/bgaraude/db96718b24eae56e764452163be67018

As you can see in the above gist, when the where clause is B.id = ?, it returns nothing. But rewriting the where clause as "B.id = concat(?)" or "B.id like ?", then it works (the bound parameter is the string "a" in the example).

Is this a known issue? Am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant