Skip to content

fix(csharp): set BUFFER_LENGTH to null in GetColumns result; re-enable CanGetColumnsExtended for SEA (PECO-3008)#444

Open
eric-wang-1990 wants to merge 2 commits intomainfrom
fix/peco-3008-sea-get-columns-extended-buffer-length
Open

fix(csharp): set BUFFER_LENGTH to null in GetColumns result; re-enable CanGetColumnsExtended for SEA (PECO-3008)#444
eric-wang-1990 wants to merge 2 commits intomainfrom
fix/peco-3008-sea-get-columns-extended-buffer-length

Conversation

@eric-wang-1990
Copy link
Copy Markdown
Collaborator

Problem

CanGetColumnsExtended was skipped for SEA (Skip.If(Protocol == "rest")) because the SEA path returned different BUFFER_LENGTH values than Thrift.

Root cause: FlatColumnsResultBuilder (used by the three-calls fallback path via GetColumnsAsync) called ColumnMetadataHelper.GetBufferLength which returned non-null values for numeric types (BOOLEAN=1, TINYINT=1, SMALLINT=2, INT=4, FLOAT=4, BIGINT=8, DOUBLE=8, TIMESTAMP=8, DATE=8, DECIMAL=computed). The expected test values and the Thrift path both return null for all columns.

The JDBC spec defines BUFFER_LENGTH as an unused column — it should always be null. CreateExtendedColumnsResult (the DESC TABLE EXTENDED path) already returned null unconditionally via bufferLengthBuilder.AppendNull(). FlatColumnsResultBuilder was inconsistent.

Changes

  • FlatColumnsResultBuilder: replace the GetBufferLength call with AppendNull(), making BUFFER_LENGTH consistently null across all result paths (matching CreateExtendedColumnsResult and Thrift).
  • StatementTests.cs: remove the Skip.If(Protocol == "rest") guard from CanGetColumnsExtended.

Test Plan

CanGetColumnsExtended now runs for both Thrift and SEA protocols, covering both useDescTableExtended=true and useDescTableExtended=false.

Fixes PECO-3008

🤖 Generated with Claude Code

eric-wang-1990 and others added 2 commits May 5, 2026 21:11
…e-enable CanGetColumnsExtended for SEA (PECO-3008)

JDBC spec defines BUFFER_LENGTH as unused — it should always be null.
FlatColumnsResultBuilder was computing non-null values for numeric types
(INT=4, BIGINT=8, etc.) via ColumnMetadataHelper.GetBufferLength, causing
CanGetColumnsExtended to fail for the SEA three-calls fallback path while
Thrift (which reads directly from the server and returns null) passed.
CreateExtendedColumnsResult (DESC TABLE EXTENDED path) already returned
null unconditionally; this change makes FlatColumnsResultBuilder consistent.

Removes the Skip.If(Protocol == "rest") guard from CanGetColumnsExtended.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eric-wang-1990 eric-wang-1990 enabled auto-merge May 6, 2026 18:49
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