SqlFieldQueries with partitions on Calcite
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
I tried to switch my existing code to Calcite on Ignite 2.14.0.
We do use some SqlFieldQuery, and call .setPartitions(int...) on them to only return results from specific partitions. This works fine with the H2 engine.
However, on calcite engine it seem to return all results for a query whatever we pass to .setPartitions(int...).
Th javadoc for .setPartitions(int...) says: "The query will be executed only on nodes which are primary for specified partitions.", which makes me thinks that the correct behavior is calcite, and that H2 is incorrect.
In any case, it would be better to have the same behavior whatever the engine is. Additionally, is there a way to return results for a specific partition on calcite?
Here is a simple test case reproducing this issue: https://gist.github.com/bgaraude/873c40305ca0874f88f76f1ebe5dcf74
Contributor guide
Research direction
Start with the linked gist and the SqlFieldQuery.setPartitions(int...) entry point, then compare partition handling between the H2 and Calcite engines. Determine which behavior matches the documented contract and verify that queries return results only from the requested partitions, with consistent behavior across both engines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100