ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Calcite engine do not return expected results in some cases

Open bgaraude opened this issue 9 months ago • 0 comments

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?

bgaraude avatar Mar 12 '25 12:03 bgaraude