Skip to content

Fix JDBC compliance of DatabricksStatement#setMaxRows(0) #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

romanb
Copy link

@romanb romanb commented Jul 16, 2025

Description

According to the JDBC interface contract of Statement#setMaxRows, a value of 0 must be interpreted as "no limit". Currently passing a value of 0 literally means 0 rows will be returned. Instead, the DEFAULT_RESULT_ROW_LIMIT seems to capture the semantics of "no limit", if I'm reading the code correctly, so I used that in the PR.

Testing

Tests have been added to check that setting max rows of 0 results in the DEFAULT_RESULT_ROW_LIMIT to be set.

Additional Notes to the Reviewer

According to the JDBC interface contract of Statement#setMaxRows, a
value of 0 must be interpreted as "no limit". The
DEFAULT_RESULT_ROW_LIMIT seems to capture these semantics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant