opensearch-project / opensearch-project/sql
[TESTING] Migrate Doctest to Calcite
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
Is your feature request related to a problem?
From #4075: The doctest cluster currently doesn't have Calcite enabled. That means we can't use doctest for Calcite queries. People are working around this by disabling Doctest for these queries, instead of switching Doctest to Calcite. This also means we're not doing BWC testing for all the existing Doctest queries under Calcite.
What solution would you like?
We should put the Doctest cluter on Calcite. This will probably break many existing tests that we'll need to either update Doctest for, or fix Calcite bugs with.
To facilitate the migration, we should split Doctest into a separate GH action, so its failures don't collide with the other tests. This is also relevant since we have the SQL CLI rewrite on the way, which will probably cause lots of issues as well (unless we force doctest to keep using the V1 CLI).
What alternatives have you considered?
N/A
Do you have any additional context?
Just doing a quick search on our doc files, I found 14 files (30+ queries) where we're bypassing doctest by switching the prompt from os> to PPL>. This isn't a complete list since e.g. #4075 does a different workaround.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with doctest/test_docs.py and the context from #4075 to understand how doctest currently handles os> and PPL> prompts. Then inspect the existing test workflow before separating doctest into its own GitHub Action. Done means doctest runs against Calcite, bypasses are addressed, and resulting test failures are either fixed or updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- ci-cd, databases, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100