Comments (4)
Hi and thank you for trying it out. The primary target for us has been non-interactive use, but there's no reason it couldn't work for interactive use eventually. JDBC is huge, and contains a lot of details that are not important for an application, and covering every single one of these has not been a priority. SQLWorkbench will use a couple of features, other tools other features and unless you cover them all there's always something that will break unfortunately.
In this case you seem to have run into that setMaxRows
is not implemented. Please read the Known issues & limitations section of the readme for the difference between UnsupportedOperationException
/"not implemented" and SQLFeatureNotSupportedException
.
Could you clarify what you mean by the list of features? I don't understand what for example "Doesn't support Catalog / Schema" means.
from athena-jdbc.
I belive what ssenthi is referring to is full support for the various metadata APIs in Connection and ResultSet (and more?)
DB GUIs typically make heavy use of these in order to present a tree of database objects - schema/database/tables and usually try to look for things like stored procedures, views, triggers etc. Possibly this can be hacked by creative use of the result values instead of throwing exceptions ? I doubt it --
This is the kind of thing that even if your 100% JDBC Compliant theres enough optional and vendor differences that its unlikely to work without huge effort. (or a kind of hybrid with the official JDBC under the hood providing the metadata - not fun )
from athena-jdbc.
I think this is an area where we will have to rely on contributions. We will probably not close the holes that appear when using the driver with different tools, and we need help to get them fixed. Some of these will be very easy to fix, but some will be much more complicated.
To take one example, DatabaseMetadata#getProcedures
and a similar methods return a ResultSet
. The ResultSet
interface is enormous, and the implementation we use for actual queries can't be reused in this context. Many of these methods only need to return a ResultSet
that is empty, but even an implementation of an empty result is a couple of hundred of lines of code, unfortunately.
from athena-jdbc.
For what it is worth, I set up an interactive session in DBeaver, and I was able to query just fine using this driver. I deselected all "optional" features in the driver-manager configuration, and if I open e.g. the tables view, it complains about it not being supported, but opening a SQL editor and running statements work just fine.
To take one example, DatabaseMetadata#getProcedures and a similar methods return a ResultSet. The ResultSet interface is enormous, and the implementation we use for actual queries can't be reused in this context. Many of these methods only need to return a ResultSet that is empty, but even an implementation of an empty result is a couple of hundred of lines of code, unfortunately. I wasn't running queries through a proxy, though.
While I don't know for sure, I would venture a guess that the reason the methods return a ResultSet
is that the expectation is that you would effectively use the SQL standard INFORMATION_SCHEMA
or an equivalent to issue real database queries to implement the methods underlying the DatabaseMetadata
class. That being said, the information-schema implementation in Athena seems a bit lacking (e.g. it doesn't seem to be possible to distinguish a table and a view), and as far as I know, the DDL queries (like SHOW TABLES
) does not seem to be composable, so some of the information would require custom ResultSet
implementations.
However, contrary to your claim, I think the Result
abstraction readily available internally in the driver would make it relatively easy implement the custom ResultSet
s. An empty ResultSet
would likely not be more than 50 lines of boilerplate, which is still a lot, but far from hundreds of lines.
from athena-jdbc.
Related Issues (8)
- INSERT INTO ... VALUE support HOT 1
- How to specify or change configuration HOT 4
- SdkClientException when using profile credentials HOT 1
- Feature Request: S3 Select Object as JDBC ( or Athena results as S3 Select results) HOT 4
- Infinate loop in Result iterator for DML commands HOT 2
- Question: does the connection using JDBC must be async? HOT 3
- Not able to run any query (SELEC 1)- getting timeout exception ( using via SQLWorkbench) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from athena-jdbc.