Conversation
| public void testGetMetaData() throws SQLException { | ||
| try (Connection conn = newConnection(new Properties()); | ||
| PreparedStatement ps = conn.prepareStatement("select ? a, ? b")) { | ||
| ResultSetMetaData md = ps.getMetaData(); |
There was a problem hiding this comment.
What happens if we pass DDL (e.g. CREATE TABLE) to conn.prepareStatement? It would be nice to add a test in my opinion.
There was a problem hiding this comment.
Thanks for taking your time to review the PR!
What happens if we pass DDL (e.g. CREATE TABLE) to conn.prepareStatement?
null will be returned at this point. Below is the check in SqlBasedPreparedStatement.java. However, in ClickHouse, create table on cluster will actually return ResultSet, but I guess we don't need that as it's not helping for push-down implementation.
if (parsedStmt.isRecognized() && !parsedStmt.isQuery()) {
return null;
}It would be nice to add a test in my opinion.
Yes, the implementation is incomplete and I'll add more tests for sure.
|
Hi, any plans to complete this PR? |
|
JFYI #1700 |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions! |
Summary
Get ResultSet meta data before execution
Checklist
Delete items not relevant to your PR: