Skip to content

metadata(csharp): empty-string catalog/schema/table arg throws HiveServer2Exception on Thrift, returns on SEA #524

Description

@eric-wang-1990

Part of #519 (Thrift vs SEA metadata parity).

Problem

When an empty-string identifier argument (catalog="", schema="", table="", foreign_schema="", …) is passed to a metadata op, the protocols diverge in outcome — the single biggest non-value bucket, 1,763 outcome diffs:

outcome: thrift="exception: HiveServer2Exception" → sea="Apache.Arrow.Adbc.QueryResult"

Trigger breakdown (which empty arg caused the Thrift-only throw):

  • catalog="" → 464
  • schema_pattern="" → 224
  • schema="" → 48
  • foreign_schema="" → 36
  • table="" / foreign_table="" → 20 each
  • plus combinations

Affected ops: list_columns (1,020), list_tables (336), get_primary_keys (213), get_cross_reference (194 — every cross-reference diff is this).

Expected

Empty-string vs null arguments must be handled consistently across protocols — either both throw or both return. They should not differ in outcome.

How JDBC does it

The JDBC SEA path explicitly treats an empty-string catalog as a sentinel and returns an empty result set (DatabricksMetadataSdkClient.listSchemas → returns 0 rows when catalog.isEmpty()); the Thrift path passes it through. ADBC should define one behavior (recommend: empty-string → empty result set, never an exception) and apply it on both paths before the RPC/SQL is issued.

Suggested fix

Normalize empty-string identifier args up front (in the shared layer, #519): map to the chosen defined behavior so the Thrift path stops raising HiveServer2Exception.

Evidence

diff-report-20260615-064733Z.json, where = step[0] / outcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't workingengineer-botengineer-bot may fix this issue / take over this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions