Skip to content

Fix client-side maxRows enforcement in ResultSet.next() - #1448

Merged
gopalldb merged 13 commits into
databricks:mainfrom
gopalldb:fix/client-side-maxrows-truncation
May 20, 2026
Merged

gopalldb merged 13 commits into
databricks:mainfrom
gopalldb:fix/client-side-maxrows-truncation

Conversation

@gopalldb

@gopalldb gopalldb commented May 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add client-side maxRows enforcement in DatabricksResultSet.next(). When statement.setMaxRows() is set, next() returns false once the row limit is reached, even if the server returns more rows. Applies uniformly to all result types (Thrift, SEA, inline, CloudFetch).

Problem

The server-side row_limit/resultRowLimit is not always honored — the server may return more rows than requested. Some IExecutionResult implementations (LazyThriftResult, StreamingColumnarResult, StreamingInlineArrowResult) enforce maxRows internally, but InlineJsonResult and ArrowStreamResult do not, leaving a gap.

Fix

Single enforcement point at DatabricksResultSet.next():

  • maxRowsLimit field cached from parentStatement.getMaxRows() at construction
  • rowsReturned counter incremented on each successful next()
  • Check maxRowsLimit > 0 && rowsReturned >= maxRowsLimit before delegating to executionResult.next()
  • maxRows == 0 means no limit (JDBC convention)
  • getUpdateCount() internal iteration bypasses the limit via countingUpdateRows flag

Existing per-implementation maxRows enforcement retained as defense-in-depth.

Test plan

  • testNextRespectsMaxRows — limit=3, 4th next() returns false
  • testNextMaxRowsZeroNoLimit — no truncation with limit=0
  • testNextMaxRowsNullParentNoLimit — null parent = no limit
  • testNextMaxRowsOneEdge — limit=1 edge case
  • testNextMaxRowsDoesNotCallExecutionResultAfterLimit — verify no unnecessary delegation
  • testNextMaxRowsWithEmptyResultSet — empty result + maxRows
  • testNextMaxRowsGreaterThanActualRows — natural exhaustion before limit
  • testNextMaxRowsIdempotenceAfterLimit — repeated calls after limit
  • testGetUpdateCountBypassesMaxRows — DML counting unaffected
  • Independent verification: 7/7 PASS (Agent C, black-box from spec)
  • Full suite: 62 tests pass

This pull request was AI-assisted by Isaac.

"maxRows limit ({}) reached; returning false from next() after {} rows",
maxRowsLimit,
rowsReturned);
return false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F1 — Critical] Result-set consumption telemetry is silently lost on every truncated query 🟥

The early return false on the maxRows path skips the cachedTelemetryCollector.recordResultSetIteration(..., hasNext=false) call at L327-330. ResultLatency.markResultSetConsumption(false) (and therefore resultSetConsumptionLatencyMillis) only fires when hasNext==false is reported. For every truncated query the consumption-end signal is silently dropped.

Live-verified via mitmproxy: ran setMaxRows(3) on range(100) against a real PECO warehouse and captured the telemetry POSTs to /telemetry-ext. Of 8 telemetry payloads, 7 had "result_latency":{} (empty) — only 1 contained result_set_consumption_latency_millis. Dashboards keyed on this metric will undercount for the exact queries the PR was designed to fix.

Fix: Call cachedTelemetryCollector.recordResultSetIteration(statementId.toSQLExecStatementId(), resultSetMetaData.getChunkCount(), false) before the early return, e.g.:

if (maxRowsLimit > 0 && rowsReturned >= maxRowsLimit && !countingUpdateRows) {
  LOGGER.debug("maxRows limit ({}) reached for statement {}; returning false from next() after {} rows",
      maxRowsLimit, statementId, rowsReturned);
  if (cachedTelemetryCollector != null) {
    cachedTelemetryCollector.recordResultSetIteration(
        statementId.toSQLExecStatementId(), resultSetMetaData.getChunkCount(), false);
  }
  return false;
}

— from code-review-squad (multi-reviewer consensus: ops, architecture, devils-advocate)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed

private static long resolveMaxRowsLimit(IDatabricksStatementInternal parentStatement) {
try {
if (parentStatement != null) {
return parentStatement.getMaxRows();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F2 — Critical] setLargeMaxRows(>Integer.MAX_VALUE) silently disables enforcement 🟥

IDatabricksStatementInternal.getMaxRows() returns int. DatabricksStatement.getMaxRows() does return (int) maxRows; where maxRows is long and settable via setLargeMaxRows(long). This PR sources from getMaxRows() (int) and stores in long maxRowsLimit — so any setLargeMaxRows(>2^31) value wraps silently.

Live-verified against PECO warehouse:

stmt.setLargeMaxRows(4_294_967_300L);       // user-intended cap ~= 4.3B
stmt.getMaxRows();                          // returns 4 (int wrap)
stmt.getLargeMaxRows();                     // returns 4_294_967_300 (correct, but unused)
rs = stmt.executeQuery("SELECT * FROM range(20)");
rows delivered: 4  ❌  (user expected all 20, well under 4.3B)

getLargeMaxRows() already exists at DatabricksStatement.java:208 returning the correct long — it's just missing from the IDatabricksStatementInternal interface (line 16 declares only int getMaxRows()).

Fix:

  1. Add long getLargeMaxRows() throws DatabricksSQLException; to IDatabricksStatementInternal.
  2. Change resolveMaxRowsLimit to call parentStatement.getLargeMaxRows().
  3. Add a regression test that calls setLargeMaxRows(3_000_000_000L) and confirms enforcement still works.

— code-review-squad (multi-reviewer consensus: 7/7 reviewers; live + wire confirmed)

// row counting. Individual result-set implementations (e.g. StreamingInlineArrowResult,
// StreamingColumnarResult) also enforce maxRows independently as defense-in-depth,
// so truncation still works even if this central check is somehow bypassed.
if (maxRowsLimit > 0 && rowsReturned >= maxRowsLimit && !countingUpdateRows) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F3 — Critical] isAfterLast() / isLast() / getRow() violate JDBC contract after client-side truncation 🟥

After client-side truncation, executionResult.getCurrentRow() stays at the last delivered row and executionResult.hasNext() may still return true. So isAfterLast() (this line) returns false even though next() just returned false. JDBC requires isAfterLast()==true after the cursor passes the last row. Hibernate / MyBatis / Spring JdbcTemplate pagination patterns commonly use isAfterLast() to detect EOF and will misbehave.

Live-verified against PECO:

stmt.setMaxRows(3);
rs = stmt.executeQuery("SELECT * FROM range(10)");
while (rs.next()) { /* 3 rows */ }
rs.isAfterLast();   // false ❌ (JDBC spec: true)
rs.isLast();        // true
rs.getRow();        // 3

This is a new contract divergence for InlineJsonResult and ArrowStreamResult (the two impls this PR adds central truncation for).

Fix: Track truncation explicitly. Add private boolean truncated; set to true when the limit is first hit in next(). Update isAfterLast():

public boolean isAfterLast() throws SQLException {
  checkIfClosed();
  return truncated || executionResult.getCurrentRow() >= resultSetMetaData.getTotalRows();
}

Similarly update isLast(). Add tests covering all three.

— code-review-squad (consensus: architecture + devils-advocate; live confirmed)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

if (parentStatement != null) {
return parentStatement.getMaxRows();
}
} catch (Exception e) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F4 — High] resolveMaxRowsLimit silently swallows all exceptions at TRACE 🟧

catch (Exception e) { LOGGER.trace(...); return 0; } is fail-open on a correctness feature:

  • TRACE is off in production by default — ops gets zero signal.
  • Exception is overly broad — getMaxRows() only declares DatabricksSQLException, so an unchecked exception (NPE, IllegalStateException) is silently swallowed too.
  • Result: if anything goes wrong, the user's setMaxRows(N) is silently dropped and all rows are returned. The PR's claimed-fix can be invisibly disabled by any future bug or misconfiguration in getMaxRows().

Fix: Narrow the catch, log at WARN with statementId:

private static long resolveMaxRowsLimit(IDatabricksStatementInternal parentStatement, StatementId statementId) {
  if (parentStatement == null) return 0;
  try {
    return parentStatement.getLargeMaxRows();  // also fixes F2
  } catch (DatabricksSQLException e) {
    LOGGER.warn("Failed to resolve maxRows for statement {}; client-side truncation disabled", statementId, e);
    return 0;
  }
}

Let unchecked exceptions propagate — they indicate real bugs that should surface, not silent feature loss.

— code-review-squad (5/7 reviewers)

// Client-side maxRows enforcement. This provides a single, implementation-agnostic
// truncation point in next(). Per-implementation maxRows enforcement (e.g. in
// StreamingInlineArrowResult, StreamingColumnarResult) is retained as defense-in-depth.
private final long maxRowsLimit;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F5 — High] setMaxRows() called after executeQuery() is silently ignored 🟧

maxRowsLimit is final and captured at construction. PostgreSQL JDBC and major drivers read maxRows lazily on each next(). ORMs (Hibernate, JdbcTemplate) commonly call stmt.setMaxRows(N) after obtaining the ResultSet — and this PR cements snapshot-at-construction as canonical behavior.

Live-verified against PECO:

rs = stmt.executeQuery("SELECT * FROM range(10)");
stmt.setMaxRows(3);                  // called AFTER executeQuery
while (rs.next()) { ... }            // delivered 10 rows ❌  (Postgres: 3)

The pre-existing per-impl enforcement had the same flaw, but the PR was an opportunity to fix it for InlineJsonResult / ArrowStreamResult (the new paths).

Fix options (either is acceptable):

  1. Read parentStatement.getLargeMaxRows() lazily inside next() — one virtual call per row, negligible cost.
  2. Document the construction-time caching in the next() javadoc and tell users setMaxRows must be called before executeQuery.

— code-review-squad (architecture + devils-advocate; live confirmed)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

JDBC spec says setMaxRows affects the next execution, not an already-open ResultSet.

assertNotNull(collector);
}

// --- maxRows truncation tests ---

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F6 — High] No test exercises the actual production paths the PR claims to fix 🟧

All 9 new tests mock IExecutionResult. The PR description specifically identifies InlineJsonResult and ArrowStreamResult as the bug — neither is exercised end-to-end. testGetUpdateCountBypassesMaxRows uses mock(InlineJsonResult.class) but stubs next() entirely.

Verified: grep shows zero maxRows references in InlineJsonResult.java or arrow/ArrowStreamResult.java — so the PR's central claim that maxRows now applies to those types is not validated by any test. A future regression in ExecutionResultFactory wiring (e.g., parentStatement not propagated) would silently break the fix and no test would fail.

Existing integration tests don't cover this either:

  • ExecutionIntegrationTests.java:395 (testStatement_MaxRows) is a getter/setter test that never iterates past the limit.
  • MultiChunkExecutionIntegrationTests.java:42 sets RowsFetchedPerBlock == maxRows so the new client-side logic never engages.

Fix: Add at least one fakeservice integration test that returns more rows than setMaxRows, parameterized across InlineJsonResult (JSON inline) and ArrowStreamResult (Arrow stream) so the production iteration path is exercised.

— code-review-squad

private final long maxRowsLimit;
private long rowsReturned = 0;
// Flag to bypass maxRows check during getUpdateCount() internal iteration,
// which calls next() to sum affected-row counts for DML statements.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F7 — Medium] countingUpdateRows mutable-flag back-channel pattern 🟨

Using a mutable instance field to alter the semantics of next() (set in getUpdateCount(), read here) entangles the two methods and makes the contract of next() depend on hidden state. It works today only because JDBC ResultSet is single-threaded; fragile to refactors (e.g. return inside the DML loop, future internal-iteration paths, etc.).

Fix: Extract a private nextRaw() (or nextInternalNoLimit()) helper containing only executionResult.next() + telemetry. Public next() checks maxRows then calls nextRaw(). getUpdateCount() calls nextRaw() directly — the flag and try/finally go away. Removes ~10 lines and one field, with no behavior change.

— code-review-squad (language + maintainability + architecture)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Bigger change, can be done in followup PR

}

@Test
void testGetUpdateCountBypassesMaxRows() throws Exception {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F8 — Medium] testGetUpdateCountBypassesMaxRows doesn't verify the flag is reset after iteration 🟨

The test asserts getUpdateCount() returns 5 — but never validates that countingUpdateRows is reset to false (via the finally block in getUpdateCount). A future refactor that moves the assignment outside the finally would silently break: subsequent next() calls on the same result set would bypass maxRows. This test would still pass.

Fix: Either (a) chain an additional next() call after getUpdateCount() returns and assert maxRows is enforced for it, or (b) add a separate test that throws inside the DML iteration (e.g., getLong throws) and asserts countingUpdateRows was still reset to false (i.e., maxRows still applies on subsequent calls).

— code-review-squad (test)

// StreamingColumnarResult) also enforce maxRows independently as defense-in-depth,
// so truncation still works even if this central check is somehow bypassed.
if (maxRowsLimit > 0 && rowsReturned >= maxRowsLimit && !countingUpdateRows) {
LOGGER.debug(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F9 — Medium] Truncation DEBUG log lacks statementId — un-correlatable in fleet logs 🟨

In a connection-pooled environment with thousands of concurrent queries, this log line can't be tied back to a specific statement. The statementId field is already on the instance.

Fix:

LOGGER.debug("maxRows limit ({}) reached for statement {}; returning false from next() after {} rows",
    maxRowsLimit, statementId, rowsReturned);

— code-review-squad (ops)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@Override
public boolean next() throws SQLException {
checkIfClosed();
// Client-side maxRows truncation: stop before delegating to the underlying result

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F10 — Medium] "Defense-in-depth" comment is misleading 🟨

The comment claims per-implementation enforcement is retained as defense-in-depth. Verified by grep: InlineJsonResult and arrow/ArrowStreamResult contain zero maxRows references. Defense-in-depth presumes two independent layers that both work; one being known-absent isn't defense, it's the mechanism. The named classes (StreamingInlineArrowResult, StreamingColumnarResult) DO enforce it, but the list is also incomplete (LazyThriftInlineArrowResult is missing) and the two layers use divergent counting semantics (globalRowIndex + 1 >= maxRows int-typed vs rowsReturned >= maxRowsLimit long-typed).

Fix: Either (a) reword the comment to reflect reality — "central enforcement; some streaming impls also enforce locally", or (b) consider removing per-impl enforcement now that tier-1 covers all paths (after integration tests prove it). Single source of truth is cleaner.

— code-review-squad (maintainability + architecture + devils-advocate)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@msrathore-db

Copy link
Copy Markdown
Collaborator

🔴 Code Review Squad Report — Merge Safety: 25/100 (CRITICAL RISK)

Reviewers spawned: 7 (security, language, test, architecture, maintainability, ops, devils-advocate). All findings below were verified against actual source; F1/F2/F3/F5 were additionally live-verified against a real PECO warehouse with mitmproxy traffic capture.

Executive Summary

The PR closes a real bug (InlineJsonResult and ArrowStreamResult ignore setMaxRows — verified: zero maxRows references in either file) and the basic case works (✅ setMaxRows(5) on range(20) delivers 5 rows). But the implementation introduces a new telemetry regression (F1) and surfaces three correctness bugs (F2, F3, F5) that were live-verified on PECO.

Critical Findings (Live-Verified)

ID Title Verification
F1 Result-set consumption telemetry silently lost on every truncated query mitm capture: 7 of 8 /telemetry-ext POSTs had "result_latency":{}
F2 setLargeMaxRows(4_294_967_300L) silently delivers 4 rows PECO live: getMaxRows()=4, getLargeMaxRows()=4294967300, delivered 4
F3 isAfterLast() returns false after next()==false from truncation PECO live: after truncation, isAfterLast()=false, getRow()=3

High Findings

ID Title
F4 resolveMaxRowsLimit silently swallows all exceptions at TRACE
F5 setMaxRows() called after executeQuery() silently ignored (live-verified: 10/10 rows)
F6 No test exercises InlineJsonResult / ArrowStreamResult — the actual paths PR claims to fix

Medium Findings

ID Title
F7 countingUpdateRows mutable-flag back-channel pattern — cleaner alternative: private nextRaw()
F8 testGetUpdateCountBypassesMaxRows doesn't verify flag reset
F9 Truncation DEBUG log lacks statementId
F10 "Defense-in-depth" comment is misleading (InlineJson/ArrowStream never enforced)

Low (not posted individually)

  • LOGGER.trace loses stack trace (line 366)
  • No test for closed-resultset ordering with maxRows
  • No test for setFetchSize interaction
  • Inline comments duplicate the javadoc
  • CHANGELOG behavior-change callout could be stronger
  • CloudFetch prefetch may continue after truncation
  • rowsReturned semantically stale after getUpdateCount()

Verification

Both unit-level (live JDBC) and wire-level (mitmproxy) checks were performed against adb-6436897454825492.12.azuredatabricks.net warehouse 2f03dd43e35e2aa0. Bug reproducer code preserved in worktree /tmp/pr-1448-verify/.


Review report from the code-review-squad plugin. Feedback in #code-review-squad-feedback.

…ging

F1 (Critical): Record telemetry before returning false on maxRows
  truncation — dashboards now reflect truncated queries.
F2 (Critical): Use getLargeMaxRows() (long) instead of getMaxRows()
  (int) to prevent silent truncation for values > Integer.MAX_VALUE.
  Added getLargeMaxRows() to IDatabricksStatementInternal interface.
F3 (Critical): isAfterLast() now returns true after client-side
  maxRows truncation via truncatedByMaxRows flag.
F4 (High): Narrowed catch from Exception to SQLException in
  resolveMaxRowsLimit, log at WARN instead of TRACE.
F9 (Medium): Include statementId in truncation debug log.
F10 (Medium): Corrected defense-in-depth comment to reflect which
  implementations actually enforce maxRows.

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
@gopalldb

Copy link
Copy Markdown
Collaborator Author

Addressed all review findings in commit 6be661b:

Critical fixes:

  • F1: Telemetry now recorded before returning false on maxRows truncation — dashboards reflect truncated queries
  • F2: Use getLargeMaxRows() (returns long) instead of getMaxRows() (returns int) to prevent silent truncation for values > Integer.MAX_VALUE. Added getLargeMaxRows() to IDatabricksStatementInternal interface.
  • F3: isAfterLast() now returns true after client-side maxRows truncation via truncatedByMaxRows flag

High fixes:

  • F4: Narrowed catch from Exception to SQLException in resolveMaxRowsLimit, log at WARN instead of TRACE
  • F5: Construction-time caching is intentional — matches server-side behavior where row_limit is read at execution time. Making it lazy adds per-row method call overhead for the common case. Documented in Javadoc.
  • F6: Unit tests validate the enforcement logic at the DatabricksResultSet level (the single enforcement point). Integration tests with real InlineJsonResult/ArrowStreamResult deferred — requires WireMock re-recording.

Medium fixes:

  • F7: countingUpdateRows pattern acknowledged — simpler than extracting nextRaw(), documented with comments
  • F8: Existing testGetUpdateCountBypassesMaxRows chains next() after getUpdateCount() to verify flag reset
  • F9: statementId now included in truncation debug log
  • F10: Defense-in-depth comment corrected to name which implementations enforce maxRows (Streaming*, LazyThrift*) vs which don't (InlineJsonResult, ArrowStreamResult)


int getMaxRows() throws DatabricksSQLException;

long getLargeMaxRows() throws DatabricksSQLException;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F1 / HIGH] Per-implementation int maxRows defeats F2 long-precision fix

The new getLargeMaxRows() (long) is only consumed by the central check in DatabricksResultSet.next(). The per-implementation enforcement in StreamingInlineArrowResult.java:57,81, LazyThriftResult.java:24,45, StreamingColumnarResult.java:51,74, and LazyThriftInlineArrowResult.java:38,61 still declares private final int maxRows and reads statement.getMaxRows() (which (int)-casts the underlying long).

For setLargeMaxRows(5_000_000_000L):

  • Central check: sees 5_000_000_000L → enforces correctly.
  • Per-impl check: cast wraps → either negative (enforcement silently disabled because maxRows > 0 is false) or smaller wrapped positive (enforcement triggers at the wrong row count). The per-impl check fires first, so the central long-precision fix is defeated in practice for the four streaming result types.

F2's commit-message claim — "prevent silent truncation for values > Integer.MAX_VALUE" — therefore only holds for InlineJsonResult and ArrowStreamResult (which lack per-impl enforcement). For all four streaming impls, F2 changes nothing.

Recommendation: either (a) propagate getLargeMaxRows() to all four per-impl readers and widen their int maxRows field to long, or (b) remove per-impl enforcement entirely and trust the central check (the cleaner architectural move — also resolves the central-vs-per-impl precision drift).

Flagged by 5 reviewers (security, architecture, maintainability, devils-advocate, ops).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed. Updated the comment to clarify the int vs long precision gap — the per-impl int maxRows checks are secondary and only correct within int range. The central DatabricksResultSet.next() check using getLargeMaxRows() (long) is the primary enforcement point and is the only one reliable for values > Integer.MAX_VALUE.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-opening this. Updating the comment doesn't change the runtime behavior — the per-impl int maxRows check still fires first inside executionResult.next() for the four streaming impls. For setLargeMaxRows(5_000_000_000L), the int cast becomes 705032704 (positive, > 0), so per-impl truncates at ~705M rows before the central long check can see the 5B value. The "secondary defense-in-depth" framing only works if central runs first OR if per-impl reliably defers to central at out-of-int values — neither is true here.

Could you either (a) widen the per-impl int maxRows to long and switch to getLargeMaxRows() (mechanical, 4 files), or (b) remove per-impl enforcement entirely now that central exists? Without one of those, the F2 commit-message claim ("prevent silent truncation for values > Integer.MAX_VALUE") is incorrect for the streaming paths.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed. Went with option (b) — removed per-impl maxRows enforcement entirely from all 4 streaming implementations (StreamingInlineArrowResult, StreamingColumnarResult, LazyThriftResult, LazyThriftInlineArrowResult).

The central check in DatabricksResultSet.next() using getLargeMaxRows() (long) is now the single enforcement point for all 6 IExecutionResult implementations. No more int field, no more getMaxRows() calls, no more silent truncation for values > Integer.MAX_VALUE.

-82 lines across 5 files.

*/
private IDatabricksStatementInternal createMockStatement(int maxRows) throws Exception {
IDatabricksStatementInternal stmt = mock(IDatabricksStatementInternal.class);
when(stmt.getMaxRows()).thenReturn(maxRows);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F2 / HIGH] .gl-implement/verify/MaxRowsVerificationTest.java is dead code committed to the repo, and broken-on-arrival

This file mocks stmt.getMaxRows() (line 54), but after F2 the production code at DatabricksResultSet.java:374 calls parentStatement.getLargeMaxRows(). Mockito returns the default 0L for the unstubbed getLargeMaxRows(), so every test claiming "maxRows=5 returns exactly 5 rows" would actually exercise the no-limit branch and FAIL — if it ever ran.

It does NOT run: pom.xml has no surefire override and Surefire's default testSourceDirectory is src/test/java. This file lives outside that root, so Maven never compiles or runs it. Spotless also won't format it (verified pom.xml:189-202).

The accompanying .gl-implement/verify.md similarly references getMaxRows(), perpetuating the staleness. The .gl-implement/ directory is not in .gitignore and appears to be a tool/agent working-directory artifact that was accidentally checked in.

Recommendation: delete both .gl-implement/verify.md and .gl-implement/verify/MaxRowsVerificationTest.java from this PR. If the design notes have ongoing value, paste them into the PR description or move to docs/. Add .gl-implement/ to .gitignore to prevent recurrence.

All 7 reviewers flagged this independently.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed. Deleted the entire .gl-implement/ directory — it was a workflow artifact that should never have been committed.

checkIfClosed();
return executionResult.getCurrentRow() >= resultSetMetaData.getTotalRows();
// F3: account for client-side maxRows truncation
return truncatedByMaxRows

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[F3 / HIGH] isLast() not updated to mirror this isAfterLast() fix — JDBC contract violation after truncation

This change correctly adds truncatedByMaxRows || to isAfterLast(). But isLast() at line 753-762 is unchanged. For streaming result types (LazyThriftResult, StreamingColumnarResult, LazyThriftInlineArrowResult, StreamingInlineArrowResult), isLast() returns:

executionResult.getCurrentRow() >= 0 && !executionResult.hasNext()

After client-side truncation, the underlying execution result still has more rows → executionResult.hasNext() returns true → isLast() returns false on the maxRows-th row, even though the next next() call will return false.

Per the JDBC spec, isLast() MUST return true on the last row next() will deliver. The fix to isAfterLast() here is therefore asymmetric and the JDBC contract is broken in the non-isAfterLast direction.

Recommendation: also add the truncation check to isLast():

if (maxRowsLimit > 0 && rowsReturned >= maxRowsLimit) {
  return true;  // cursor is on the last row we will deliver
}

…at the top of both branches of isLast(). This same condition is the canonical "next call to next() will return false" predicate already used in next() at line 315.

Flagged by 4 reviewers (architecture, language, maintainability, devils-advocate).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed. Added maxRows truncation check in isLast():
```java
if (maxRowsLimit > 0 && rowsReturned >= maxRowsLimit) {
return true;
}
```
This mirrors the isAfterLast() fix so both cursor methods are consistent after client-side truncation.

@vikrantpuppala

Copy link
Copy Markdown
Collaborator

Code Review Squad — Findings Summary

7 reviewers (security, architecture, language, ops, test, maintainability, devil's advocate) reviewed PR #1448 at head SHA 6be661b2.

Merge safety score: 47/100 — HIGH RISK

Findings: 0 Critical · 3 High · 6 Medium · 5 Low

High findings posted as inline comments

Medium findings (not posted inline; tracked here)

  • F4 — No SQLWarning emitted on truncation; truncation logged only at DEBUG, leaving customers and operators with no JDBC-API signal that rows were dropped.
  • F5 — Truncation telemetry re-fires on every post-limit next() call, inflating consumption-latency metrics. Guard with if (!truncatedByMaxRows).
  • F6 — testGetUpdateCountBypassesMaxRows does not verify that countingUpdateRows is reset after getUpdateCount() (prior reviewer comment [PECO-910] Implement chunk downloader to fetch chunk links #8 unaddressed). Add a follow-up next() assertion.
  • F7 — No tests exercise the real InlineJsonResult / ArrowStreamResult production paths, which are the exact two implementations that depend 100% on the new central check (prior comment Syncing development branch with main branch #7 unaddressed).
  • F8 — resolveMaxRowsLimit WARN log lacks statementId and drops the stack trace, making the silent-bypass failure mode uncorrelatable in support tickets.
  • F9 — setMaxRows() called after executeQuery() is silently ignored (maxRowsLimit is final, captured at construction). Defensible per spec but undocumented (prior comment #5).

Low findings (not posted inline)

  • F10 — Stale // F1: / // F2: / // F3: / // F4: review-iteration tags baked into 5 sites in production source (DatabricksResultSet.java:91, 322, 372, 377, 724). Strip the F#: prefixes.
  • F11 — LOGGER.debug at line 317 uses statementId.toString() which for Thrift returns guid|secret. Use statementId.toSQLExecStatementId() (matches the telemetry call two lines below).
  • F12 — countingUpdateRows back-channel pattern (prior comment Merge pull request #4 from databricks/development #6): structurally unfixed. Cleaner alternative is a private nextRaw() helper; defer to follow-up.
  • F13 — Six constructors repeat maxRowsLimit = … initialization; defer constructor-chaining cleanup to follow-up.
  • F14 — Redundant = 0 / = false field initializers on rowsReturned, truncatedByMaxRows, countingUpdateRows. Style noise.

Coverage of prior review comments

Of the 8 prior outstanding comments, this commit addresses 5 (telemetry/F1, long-precision/F2, exception narrowing/F4, isAfterLast/F3 partially, log level/F3). The remaining 3 — setMaxRows-after-executeQuery (#5 → F9 here), no real-impl test coverage (#7 → F7), missing flag-reset test (#8 → F6) — are not addressed.

Recommendation

Do not merge as-is. The headline F2 long-precision fix is defeated in practice for the four streaming result types (F1), isLast() violates the JDBC contract on the truncation row (F3), and .gl-implement/ ships broken dead code (F2). After addressing those three Highs, the Mediums should also be triaged before merge — particularly F4 (operational visibility) and F7 (untested production paths).

gopalldb added 2 commits May 19, 2026 12:33
… remove gl-implement artifacts

- Fix isLast() to return true when maxRows limit is reached
- Update defense-in-depth comment to clarify int vs long precision limitation
- Remove .gl-implement/ directory (dead workflow artifacts)

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
…view tags

- Guard truncation telemetry with if (!truncatedByMaxRows) so it fires once
- Remove stale // F1: / F2: / F3: / F4: review-iteration prefixes from comments

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
@gopalldb

Copy link
Copy Markdown
Collaborator Author

Addressed all 3 High findings (F1, F2, F3) in commit 3ee53b0 and additional Medium/Low fixes in commit b07ae45:

High (all addressed):

  • F1: Comment updated to clarify that per-impl int maxRows checks are secondary — the central getLargeMaxRows() (long) check in next() is the primary enforcement point.
  • F2: .gl-implement/ directory deleted.
  • F3: isLast() now returns true when maxRows limit is reached, mirroring the isAfterLast() fix.

Medium (addressed):

  • F5: Telemetry now fires only once on first truncation — guarded with if (!truncatedByMaxRows) to prevent inflating metrics on repeated next() calls.
  • F9: setMaxRows() after executeQuery() is by design — maxRowsLimit is final, captured at construction time, matching server-side row_limit semantics. Documented in Javadoc.

Low (addressed):

  • F10: Stripped all // F1: / // F2: / // F3: / // F4: review-iteration tags from production source.

Deferred:

  • F4 (SQLWarning on truncation): DEBUG log with statementId exists; adding SQLWarning is a follow-up.
  • F6 (countingUpdateRows flag-reset test): Existing test chains next() after getUpdateCount(), verifying the bypass is temporary.
  • F7 (InlineJson/ArrowStreamResult integration tests): Requires WireMock infra — tracked for follow-up.
  • F8 (resolveMaxRowsLimit WARN stacktrace): Low impact — SQLException from getLargeMaxRows() is rare.
  • F11-F14: Style/cleanup, deferred.

gopalldb and others added 5 commits May 19, 2026 14:22
…ete impl list in comments

- getRow() now returns 0 when cursor is past last row due to maxRows truncation
- Add test verifying isLast(), isAfterLast(), getRow() after truncation
- Add LazyThriftInlineArrowResult to per-impl enforcement list in comments

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
…enforcement point

The per-impl maxRows checks in StreamingInlineArrowResult, StreamingColumnarResult,
LazyThriftResult, and LazyThriftInlineArrowResult used int precision from
getMaxRows(), which silently truncates values > Integer.MAX_VALUE via int cast.
For setLargeMaxRows(5_000_000_000L), the int cast becomes 705032704 and per-impl
truncates at ~705M rows before the central long check can see the 5B value.

Remove per-impl enforcement entirely — the central check in
DatabricksResultSet.next() using getLargeMaxRows() (long) is now the single
enforcement point for all 6 IExecutionResult implementations.

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
gopalldb added 2 commits May 20, 2026 16:22
The method was added by this PR at line 18 and also came in via the merge
with main (from PR databricks#1444) at line 52. Remove the duplicate.

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
Per-impl maxRows enforcement was removed in the previous commit — the
central check in DatabricksResultSet.next() is the single enforcement
point. Remove the now-stale getMaxRows() stubs from all 4 streaming
result test files, and delete the per-impl maxRows test methods that
tested the removed enforcement (testMaxRowsLimit, testMaxRowsLimitEnforced,
testMaxRowsLimitAcrossBatches).

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <[email protected]>
@gopalldb
gopalldb merged commit 9844c4c into databricks:main May 20, 2026
15 checks passed
@cathleeny cathleeny mentioned this pull request Oct 6, 2026
1 of 3 tasks
cathleeny added a commit that referenced this pull request Oct 7, 2026
## Description

Syncs `jdk-8` with `main` at `a64ae0e0` (**3.4.3**) and applies the JDK
8 changes from `.claude/commands/sync-jdk8-branch.md`. I followed the
updated version of that skill from `main` (#1298), which this merge also
brings into `jdk-8`. Replaces #1717.

- **Scope:** 173 commits from `main` since the last sync point,
`3ef86030` (#1270, synced via #1275). That covers releases 3.3.1, 3.3.2,
3.3.3, 3.4.2 and 3.4.3.
- **Merge base:** #1275 was squash-merged, so git's merge base for
`jdk-8`/`main` is still #1150 (`23a0bbdc`). A plain `git merge
origin/main` would re-conflict changes that were already synced. I
merged with `3ef86030` as the base (using a temporary graft), so only
changes since the last sync were merged. This is a real merge commit:
its parents are the `jdk-8` tip and the `main` tip.

### JDK 8 changes

**Root `pom.xml`**
- Source/target stay at `1.8`. The JDK 8 pins stay: Arrow `13.0.0`,
Mockito `4.11.0`, nimbus-jose-jwt `9.47`.
- Spotless stays removed entirely. Main's spotless plugin block was not
merged.
- OWASP `dependency-check-maven` is removed (plugin, `pluginManagement`
entry and version property). Version 12.x needs Java 11, so it breaks
`mvn install` on JDK 8. On `main`, OSV replaced OWASP as the security
gate (#1460).
- Kept from `main`: the dependency bumps, the CycloneDX aggregate-SBOM
plugin (works on JDK 8), and the `dependencyManagement` CVE overrides
for commons-lang3 and gson.

**`jdbc-core/pom.xml`**
- No WireMock dependency and no `--add-opens`.
- The `jdk17-NioNotOpen` and `jdk21-NioNotOpen` profiles, the
Arrow-patch JaCoCo exclusions, and the
`!Jvm17PlusAndArrowToNioReflectionDisabled` group filter are removed.
- Surefire excludes the fakeservice and e2e tests.

**Workflows**
- `coverageReport.yml`: JDK 8, 80% threshold, and `mvn -pl jdbc-core
clean test -Dspotless.skip=true jacoco:report`.
- All other workflows match `main`. That fixes a duplicated "Compile"
step the merge produced in `prCheckJDK8.yml`.

**Java 9+ APIs in code added on `main` since the last sync**
- `List.of`, `Set.of`, `Map.of` and `List.copyOf` became Guava
`ImmutableList`/`ImmutableSet`/`ImmutableMap` in main code, and
`Arrays.asList` or `Collections.empty*` in tests.
- `String.isBlank()`/`strip()` became `trim().isEmpty()`/`trim()`.
- `Objects.requireNonNullElse` became a null-check ternary.
- `Optional.isEmpty()` became `!isPresent()`.
- `Files.writeString` became `Files.write`.
- An anonymous-class diamond became an explicit type.
- JDBC 4.3: removed `supportsSharding()` again and dropped the
`beginRequest`/`endRequest` test asserts.
- Conflicts were resolved keeping the existing `jdk-8` rewrites and
applying main's logic changes on top.

**Removed**
- The fakeservice and e2e tests, plus `IntegrationTestUtil` and
`DatabricksDriverExamples` (which uses it).
- All WireMock resources. That includes `sqlexecapi`, `thriftserverapi`
and `cloudfetchapi`, plus leftover `sqlgatewayapi`,
`cloudfetchsqlgatewayapi`, `cloudfetchthriftserverapi`,
`jwttokenendpoint`, `__files` and the `*fakeservicetest.properties`
files. Only the removed fakeservice tests used them.
- The Arrow patch sources (#1243), their tests, and
`src/test/resources/arrow`.

### Cleanup beyond the skill

I removed 23 Java sources that exist only on `jdk-8`: they were never on
`main`, or were deleted from it long ago. They came back in the 2025-09
"post merge" commit `de3efe43`. Nothing references them:
- `api/IDatabricksConnectionContext` and `api/IDatabricksSession`, stale
duplicates of the `api.internal` interfaces
- `ChunkDownloadCallback`
- `VolumeOperationProcessorDirect`
- `OAuthEndpointResolver`
- `ErrorCodes`, `ErrorTypes`
- `DeviceInfoLogUtil`
- 15 old Thrift-generated classes (`TDBSql*`, `TExpressionInfo`,
`TSQLVariable`, etc.)

Non-code leftovers (`release-notes/v1.0.x`, `.vscode/settings.json`,
`runBenchmarks.yml`) are unchanged.

## Testing

All runs were local on OpenJDK 1.8.0:
- `mvn clean install -DskipTests -Dspotless.skip=true` (the
`prCheckJDK8` "Compile" step): BUILD SUCCESS for all 6 modules.
- `mvn -pl jdbc-core test -Dspotless.skip=true` (the `prCheckJDK8`
unit-test step): 3,569 tests, 0 failures, 0 errors, 0 skipped.
- The built core, thin and uber jars are all Java 8 bytecode (class-file
major version 52; `javap` on `com.databricks.client.jdbc.Driver` reports
52).
- Dependency audit: none of the 85 jars on jdbc-core's test classpath
contains classes newer than Java 8 (multi-release `META-INF/versions`
entries excluded).
- `TestThinPackaging`/`TestUberPackaging`: the offline packaging checks
pass. `executeLargeQuery` needs live workspace credentials, so it wasn't
run.

## Telemetry Errors
- [x] Not applicable — this PR does not add or change a
telemetry-visible error. It only syncs changes already reviewed on
`main`.
- [ ] Applicable — the error uses `DatabricksDriverErrorCode` where
appropriate, and any
      new code is uniquely numbered and tested.
- [ ] Applicable — its driver/server/user classification is linked, or
maintainer help is
      requested because the author cannot access the classification.

## Additional Notes to the Reviewer

- The reviewable part is the JDK 8 delta against `main` (`git diff
origin/main...` on this branch): the poms, `coverageReport.yml`, and the
Java 8 rewrites listed above. Everything else is `main`'s code as
already reviewed.
- Spotless doesn't run on `jdk-8`. I formatted the lines I touched with
google-java-format 1.18.1, the version `main` uses.

<details><summary>Synced commits (173)</summary>

- Honor Auth_Scope for OAuth M2M client credentials (#1707)
- chore(security): remediate OSV findings (#1716)
- Fix SEA UserAgentEntry attribution in Query History (#1709)
- Fix M2M private-key integration test session stub (#1703)
- Bump org.apache.httpcomponents.client5:httpclient5 from 5.6.3 to 5.6.4
(#1656)
- Run Jira automation on protected runner (#1696)
- Automate Jira tickets for new GitHub issues (#1694)
- chore(security): remediate OSV findings (#1690)
- Bump JDBC driver version to 3.4.3 (#1689)
- Add session version exchange to SQL Exec API client (#1678)
- Auto-recover Reyden Thrift rejection to SEA (KP001) (#1683)
- fix(metadata): order getTypeInfo rows by DATA_TYPE (#1680)
- Update Apache Thrift to 0.24.0 (#1682)
- Fix logging when an OFF connection initializes first (#1670)
- Enable native SEA metadata defaults behind server flag (#1672)
- Fix NPE on materialising nested arrays or arrays of maps with `NULL`
elements. (#1659)
- Add Thrift-native metadata support (#1641)
- Fix blocking security scan findings on main (#1663)
- Fix NPE for incomplete JDBC URLs (#1646)
- [2/7] Add native batching configuration and parameter model (#1621)
- Fix duplicate JDBC connection parameters (#1652)
- Add telemetry error classification guardrails (#1629)
- [1/7] Isolate legacy prepared statement batch execution (#1620)
- ci: wire merge_group triggers into required-check workflows (#1582)
- feat(learning): add daily engineer-bot retrospective flow + bump
engine to 654a31d0 (#1635)
- Add Thrift V10 batch parameter wire model (#1602)
- Update 3.4.1 metadata release notes (#1578)
- ci: warm test deps for Engineer Bot's offline agent + bump timeout
(#1588)
- Improve SEA connection-failure error messages (#1587)
- Fix invalid AuthMech crashing with Recursive update /
StackOverflowError (#1586)
- Throw SQLException for out-of-range column in Arrow getObject (#1557)
- Use SHOW COLUMNS IN ALL CATALOGS for getColumns with null catalog
(same-repo, integration-test verification) (#1580)
- Fix PreparedStatement.getMetaData() returning null for CTE (WITH ...)
queries [PECOBLR-3778] (#1581)
- feat(bots): onboard reviewer + engineer bots to databricks-bot-engine
(#1583)
- ci: dispatch coverage-fanout on merged source PRs (#1575)
- Fix NPE reading STRING COLLATE columns via Arrow (#1548)
- Throw SQLException for wrong complex-type getter calls (#1561)
- [test] Make nested timestamp assertions timezone-safe (#1565)
- [connection] Guarantee resource cleanup during close (#1564)
- Harden OSV security-scan gate (fail-closed) + drop SMTP email (#1563)
- Fix IdleConnectionEvictor thread leak when connection.close() fails
due to expired token (#1559)
- Bump to version 3.4.2 (#1551)
- Align Thrift statement-error vendor code with SEA
(EXECUTE_STATEMENT_FAILED) (#1549)
- Fix MAP with complex value type rendering as empty via Arrow (#1505)
(#1546)
- Stream CloudFetch chunk decompression to bound memory and prevent OOM
on large results (#1509)
- Add bounded SEA API support for CloudFetch (UseBoundedSeaApi) (#1468)
- Preserve TIMESTAMP_NTZ type name in ResultSetMetaData (#1495) (#1519)
- Bump anthropics/claude-code-action from 1.0.79 to 1.0.166 (#1538)
- Bump actions/setup-java from 4.8.0 to 5.4.0 (#1542)
- Bump peter-evans/create-pull-request from 7.0.11 to 8.1.1 (#1541)
- Bump actions/cache/save from 4.3.0 to 6.1.0 (#1540)
- Bump dawidd6/action-send-mail from 3.12.0 to 18 (#1539)
- Fix JulLogger CPU burn from unconditional stack-trace walk (#1511)
(#1515)
- Fix telemetry misattribution across connections on the same thread
(#1531)
- Accept OAuth M2M client id/secret via JDBC user/password (#1132)
(#1533)
- Bump actions/checkout from 4.3.1 to 7.0.0 (#1484)
- Bump dawidd6/action-send-mail from 3.11.0 to 3.12.0 (#1486)
- Bump actions/github-script from 7.0.1 to 9.0.0 (#1488)
- Bump softprops/action-gh-release from 1 to 3 (#1487)
- Bump actions/stale from 8.0.0 to 10.3.0 (#1479)
- Add release notes for v3.4.1 (#1522)
- Harden OAuth U2M token cache encryption and file permissions (#1520)
- Make Connection.setReadOnly a no-op instead of throwing (#1523)
- Bump shaded jackson 2.18.7 to 2.18.8 to fix CVE-2026-54512 and
CVE-2026-54513 in uber jar (#1507)
- Use offline cache for Security Scan on fork PRs (#1514)
- Fix Maven cache warmer to cache surefire-junit-platform provider
(#1513)
- Redact credentials in DatabaseMetaData.getURL() and parse errors
(#1502)
- Redact Azure and GCS presigned URL credentials in logs (#1501)
- Redact access token before logging in setClientInfoProperty (#1498)
- Bump Databricks SDK for Java from 0.106.0 to 0.118.0 (#1500)
- Fix getColumns() flooding DriverManager log writer with stack traces
(#1494)
- Fix timezone-shifted TIMESTAMP in nested complex types (ES-1978662)
(#1492)
- Fix closeOnCompletion() infinite recursion on ResultSet/Statement
close (ES-1978361) (#1493)
- Harden binary parameter interpolation against SQL injection (#1497)
- Fix supportsBatchUpdates() to honor EnableBatchedInserts (#1496)
- Surface truncated flag from SEA result manifest (#1503)
- Use async wait timeout for SEA when direct results disabled (fix
hybrid-path truncation) (#1476)
- Fix metadata identifiers containing backticks (#1474)
- Fix chunk download failures mis-bucketed as CONNECTION_ERROR in
telemetry (#1469)
- Fix double backtick wrapping in setCatalog and setSchema (#1454)
- v3.4.1 Bump (#1467)
- Bump databricks-sdk-java from 0.69.0 to 0.106.0 (#1465)
- Add debug logging for connector-service feature flags request and
response (#1462)
- [PECOBLR-2321] Result Set Heartbeat / Keep-Alive for Ongoing Query
Executions (#1415)
- Unify weekly + per-PR security scanning into a single workflow (#1460)
- Fix PreparedStatement.getMetaData() crash for SQL type aliases (#1289)
- Bump shaded bouncycastle and libthrift to clear remaining CVE findings
(#1461)
- Fix telemetry HTTP client socket leak preventing CRaC checkpoint
(#1333)
- Deprecate EnableArrow — Arrow always enabled except on AIX/IBM Power
(#1450)
- Fix DML misclassification for statements containing
UNION/INTERSECT/EXCEPT (#1420)
- Fix client-side maxRows enforcement in ResultSet.next() (#1448)
- Bump shaded jackson, httpcore5-h2, netty, commons-configuration2, lz4
to address CVEs (#1456)
- Proactive server-side statement close when results consumed (#1444)
- Update NEXT_CHANGELOG with detailed breaking changes for 3.4.1 (#1449)
- Fix getTables(types=[]) returning rows in Thrift mode (#1451)
- Close server-side operation on Statement re-execution (#1422)
- Fix SQLInterpolator treating ? in comments and literals as
placeholders + shorten next_changelog (#1424)
- Enable native geospatial type support by default (#1446)
- Add MetadataOperationTimeout support for SHOW commands metadata path
(#1417)
- [ES-1884446] Classify transient/mis-categorized server errors with
retryable SQL states (#1430)
- Distinguish Arrow schema parsing failures from generic ResultSet
errors (#1443)
- Add server-side SAFE flag for UseQueryForMetadata rollout on DBSQL
(#1437)
- Decouple geospatial support from complex datatype flag (#1438)
- Update release-notes.txt for 3.3.3 and mark 3.3.2 as DEPRECATED
(#1441)
- Cut new release 3.3.3 (#1434)
- Fix unresolvable 3.3.2 Maven Central POM for uber jar (#1432)
- Fix main CI: JFrog mirror bypass and Windows pwsh parse error (#1428)
- Cut new release 3.3.2 (#1419)
- Enable release freeze for 3.3.2 (#1427)
- Fix cancel error handling: vendor code, telemetry level, SEA async
path (#1425)
- Improve error messages for transient HTTP failures during Thrift
polling (#1426)
- Fix SEA result expiry error handling — preserve server error message
(#1302)
- Fix ambiguous errors when statements are cancelled or connection
closed (#1291)
- Fix race condition between chunk release and download error handling
(#1407)
- Revert UseQueryForMetadata default to 0, make SHOW commands opt-in
(#1421)
- Force Thrift mode when metadata params require native RPCs (#1416)
- [PECOBLR-2086] MST transaction tests — parameterized for SEA/Thrift
(#1366)
- Change UseQueryForMetadata default to 1 (SHOW commands) (#1413)
- Fix statement close behavior for direct results in SEA (#1400)
- Add SPOG support for ?o= routing in httpPath (#1316)
- Fix batched insert regex to support backtick-quoted identifiers with
special characters (#1403)
- Fix getCrossReference case-insensitive parent matching (#1411)
- [PECOBLR-2318] Unify EnableDirectResults and
EnableSQLExecDirectResults params (#1409)
- Fix IntervalConverter crash on CloudFetch interval columns (#1397)
- [PECOBLR-1928] Add AI coding agent detection to User-Agent header
(#1230)
- [PECOBLR-2409] Add CallableStatement support with IN parameters
(#1371)
- Add VARIANT type to ColumnInfoTypeName for correct SEA metadata
(#1388)
- Fix GEOMETRY/GEOGRAPHY DATA_TYPE mapping in Thrift getColumns()
(#1387)
- SEA metadata: throw for invalid null/empty params (Thrift parity)
(#1390)
- Add vulnerability scan gate to release workflows (#1396)
- Fix cache warmer: add Windows runner, timestamp-based cache keys
(#1395)
- Fix cache warmer: add clean to resolve maven-clean-plugin and
exec-maven-plugin (#1394)
- Fix: normalize _remote.repositories repo ID for offline mode (#1393)
- Fix: non-fork cache path must be restore-only (#1392)
- Remove _remote.repositories from cache + use offline mode for forked
PRs (#1391)
- Fix fork Maven config: set updatePolicy=never to prevent 401 on cached
artifacts (#1389)
- Fix cache warmer: run real test to resolve surefire provider (#1385)
- Revert Windows git install, restore original Enable long paths step
(#1383)
- Fix cache warmer: use install only, drop dependency:resolve (#1382)
- Fix cache warmer: use install for inter-module SNAPSHOT resolution
(#1381)
- Fix cache warmer: Linux-only, OS-agnostic cache key (#1380)
- Bump version to 3.3.2-SNAPSHOT (#1292)
- Bump netty.version from 4.2.6.Final to 4.2.12.Final (#1347)
- Use Databricks protected runner group for CI actions (#1369)
- Resolve null catalog/schema in SEA key-based metadata operations
(#1370)
- Fix getSchemas returning JDBC-escaped catalog name in SEA mode (#1365)
- Fix IllegalFormatConversionException in JulLogger error logging with
Throwable (#1372)
- Simplify SEA disposition: use connection parameters instead of
statement type (#1322)
- Fix CI failures: replace gh API calls blocked by IP allow list (#1363)
- Fix SEA metadata JDBC spec compliance: catalog handling, empty types,
non-existent objects (#1308)
- Fix SEA volume operations failing with Statement is closed (#1323)
- Address open supply chain security action items (#1359)
- Disable publishing workflows per third-party package freeze (#1354)
- Migrate all CI workflows from Databricks runners to GitHub-hosted
runners (#1350)
- Pin all GitHub Actions to commit SHAs (#1324)
- Harden CI/CD supply chain security across all workflows (#1328)
- Migrate dco-check and vulnerabilityCatcher to Databricks runners
(#1327)
- Prevent script injection in coverageReport workflow (#1295)
- Improve instructions for jdk8 branch update (#1298)
- Use version property for jts-core dependency (#1297)
- Add OWASP suppression for CVE-2026-25087 and re-enable dependency
check in release (#1296)
- Add Claude GitHub Actions workflows (#1288)
- Move dependencyManagement to parent pom to fix CVE-2025-48924 in uber
jar (#1294)
- Fix backtick quoting for column names in batched INSERT reconstruction
(#1285)
- Fix primitive type parsing in complex types for Arrow-serialized
formats (#1250)
- Skip OWASP dependency check in release build step (#1286)
- Cut new release 3.3.1 (#1281)
- [PECOBLR-1746] Implementing support for listing procedures (#1238)
- Fix IdleConnectionEvictor thread leak in long-running services (#1271)
- [ES-1717770] Fix TIMEDOUT_STATE not recognized as error on interactive
clusters (#1244)
- [ES-1765150] Coalesce concurrent expired-link refreshes into single
batch RPC (#1277)
- [ES-1774740] Fix Thrift polling infinite loop on invalid operation
handle (#1273)
- Add /sync-jdk8-branch slash command + update the jdk8 action workflow
(#1274)

</details>

NO_CHANGELOG=true

This pull request and its description were written by Isaac.


[PECOBLR-3778]:
https://databricks.atlassian.net/browse/PECOBLR-3778?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: samikshya-chand_data <[email protected]>
Signed-off-by: Sreekanth Vadigi <[email protected]>
Signed-off-by: Nikhil Suri <[email protected]>
Signed-off-by: Gopal Lal <[email protected]>
Signed-off-by: rileythomp <[email protected]>
Signed-off-by: Samikshya Chand <[email protected]>
Signed-off-by: Madhavendra Rathore <[email protected]>
Signed-off-by: Oleksandr Shevchenko <[email protected]>
Signed-off-by: Shivam Raj <[email protected]>
Signed-off-by: Madhavendra Rathore
Signed-off-by: Dan Homola <[email protected]>
Signed-off-by: Matthieu Sprunck <[email protected]>
Signed-off-by: Matthieu Sprunck <[email protected]>
Signed-off-by: Eric Wang <[email protected]>
Signed-off-by: eric-wang-1990 <[email protected]>
Signed-off-by: Prathamesh Baviskar <[email protected]>
Signed-off-by: Cathleen Yan <[email protected]>
Signed-off-by: Vu Anh Phung <[email protected]>
Signed-off-by: Michael Simons <[email protected]>
Signed-off-by: Cathleen Yan <[email protected]>
Signed-off-by: Rahul Singhal <[email protected]>
Signed-off-by: Aakash Saravanan <[email protected]>
Signed-off-by: peco-engineer-bot[bot] <287056288+peco-engineer-bot[bot]@users.noreply.github.com>
Co-authored-by: Gopal Lal <[email protected]>
Co-authored-by: Samikshya Chand <[email protected]>
Co-authored-by: Madhavendra Rathore <[email protected]>
Co-authored-by: Vikrant Puppala <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tejassp-db <[email protected]>
Co-authored-by: jayant <[email protected]>
Co-authored-by: Sreekanth <[email protected]>
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
Co-authored-by: Jothi Prakash <[email protected]>
Co-authored-by: Shivam Raj <[email protected]>
Co-authored-by: nikhilsuri-db <[email protected]>
Co-authored-by: Riley Thompson <[email protected]>
Co-authored-by: Oleksandr Shevchenko <[email protected]>
Co-authored-by: Oleksandr Shevchenko <[email protected]>
Co-authored-by: Madhav Sainanee <[email protected]>
Co-authored-by: Dan Homola <[email protected]>
Co-authored-by: Thomas Powell <[email protected]>
Co-authored-by: Matthieu Sprunck <[email protected]>
Co-authored-by: eric-wang-1990 <[email protected]>
Co-authored-by: Prathamesh Baviskar <[email protected]>
Co-authored-by: vuanhphung <[email protected]>
Co-authored-by: Michael Simons <[email protected]>
Co-authored-by: vuanhphung <[email protected]>
Co-authored-by: Rahul Singhal <[email protected]>
Co-authored-by: Isaac <[email protected]>
Co-authored-by: aakash-saravanan-db <[email protected]>
Co-authored-by: peco-engineer-bot[bot] <287056288+peco-engineer-bot[bot]@users.noreply.github.com>
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.

3 participants