opensearch-project / opensearch-project/sql-jdbc

[BUG] JDBC driver forces SQL plugin to use the v1 engine

Open
#23 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
28
Forks
39
PR merge metrics
No merged PRs in 30d

Description

What is the bug?
Users of the JDBC driver cannot make use of new SQL plugin features because queries sent by the JDBC driver by-pass v2 engine and are always executed by the v1 engine.

What is the expected behavior?
Queries sent by JDBC driver to be attempted by v2 engine first and only fallback to v1 engine if it uses unsupported SQL features.

What is your host/environment?

  • OpenSearch 2.4.0.0
  • JDBC Driver 1.1.0.1

Do you have any additional context?
When JDBC executes a statement, it sets fetch_size parameter to 100. This fails this check here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the JDBC statement handling that sets fetch_size to 100, then inspect the referenced legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSQLQueryAction.java check. Trace how that request selects the SQL engine; done means JDBC queries attempt v2 first and fall back to v1 only for unsupported SQL features.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.