Skip to content

GH-942: Fix JDBC Connection.setCatalog() - #943

Merged
jbonofre merged 2 commits into
apache:mainfrom
eickler:fix-jdbc-set-catalog
Jan 5, 2026
Merged

GH-942: Fix JDBC Connection.setCatalog()#943
jbonofre merged 2 commits into
apache:mainfrom
eickler:fix-jdbc-set-catalog

Conversation

@eickler

Copy link
Copy Markdown
Contributor

What's Changed

Connection.setCatalog() is not silently ignored anymore (through the default implementation in Calcite) but instead it updates the catalog session option in the same way as during the initial connection.

Closes#942.

@github-actions

This comment has been minimized.

@eickler

Copy link
Copy Markdown
ContributorAuthor

Apologies for the larger than needed PR. I couldn't get the tests passing without running spotless:apply and for some reason that reformatted parts that I did not even touch.

@lidavidmlidavidm added the bug-fix PRs that fix a big. label Jan 4, 2026
@github-actionsgithub-actionsBot added this to the 18.4.0 milestone Jan 4, 2026
@lidavidm

Copy link
Copy Markdown
Member

CC @jbonofre@laurentgo any comments?

statementHandlePreparedStatementMap.remove(new StatementHandleKey(statementHandle));
// Testing if the prepared statement was created because the statement can be not created until
// Testing if the prepared statement was created because the statement can be
// not created until

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this change is unecessary (I guess it's due to reformating)

return new ExecuteResult(Collections.singletonList(metaResultSet));
} catch (SQLTimeoutException e) {
// So far AvaticaStatement(executeInternal) only handles NoSuchStatement and Runtime
// So far AvaticaStatement(executeInternal) only handles NoSuchStatement and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same here

@jbonofre

Copy link
Copy Markdown
Member

LGTM, I'm merging.

@jbonofre
jbonofre merged commit b9e40fa into apache:mainJan 5, 2026
21 of 27 checks passed
ennuite pushed a commit to ennuite/arrow-java that referenced this pull request Jan 8, 2026
## What's Changed
Connection.setCatalog() is not silently ignored anymore (through the
default implementation in Calcite) but instead it updates the catalog
session option in the same way as during the initial connection.
Closesapache#942.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fixPRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flight-sql-jdbc-driver: Connection.setCatalog() is silently ignored

3 participants

@eickler@lidavidm@jbonofre