Vertica: JDBC Driver does not support FETCH NEXT, only LIMIT
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with Drill's JDBC storage plugin and the SQL generation path that produces FETCH NEXT for query results. Reproduce the failure against a Vertica-based datasource using the reported query, then verify that the generated query uses LIMIT and returns results successfully.
Written by the indexing model from the issue text.
Description
Describe the bug
When connecting a RDBMS datasource that is based on Vertica, Drill attempts to use the FETCH NEXT approach for query optimization, however vertica JDBC doesn't support FETCH NEXT but only supports limit.
https://docs.vertica.com/12.0.x/en/sql-reference/statements/select/limit-clause/
To Reproduce
Steps to reproduce the behavior:
- Connect a Vertica based RDBMS Datasource
- Once successful, validate with SHOW SCHEMAS;
- Attempt to run a query against one of the vertica tables
- Observe the error
Expected behavior
Results should appear properly and not use fetch next
Error detail, log output or screenshots
org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query.
Sql: SELECT *
FROM "VerticaDB"."xxxxxxxxx"."yyyyyyyyy"
FETCH NEXT 1000 ROWS ONLY
Fragment: 0:0
[Error Id: d142a3d5-f5b3-4f9c-b850-a39e72604953 on a68ba75bf84a:31010]
SQL LOG:
Caused by: java.sql.SQLSyntaxErrorException: [Vertica]VJDBC ERROR: Syntax error at or near "NEXT" at character 59
at com.vertica.util.ServerErrorData.buildException()
at com.vertica.io.ProtocolStream.readExpectedMessage()
at com.vertica.dataengine.VDataEngine.prepareImpl()
at com.vertica.dataengine.VDataEngine.prepare()
Drill version
1.21.1
Additional context
- Dominant language
- Java
- Stars
- 2k
- Forks
- 989
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
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.
More from apache/drill
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Openarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100