Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-nodejs. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-nodejs) is fixed, then flips green as a tripwire.
Findings
- METADATA-037 [thrift]: getTables/getColumns with catalogName omitted fans out across ALL catalogs instead of scoping to the session's current catalog (initialCatalog) — observed 4 rows where the current catalog holds 2, plus the other catalog's only_in_b column reachable; reproduces the all-catalogs cost regression (PECOBLR-2200)
- failing test:
getTables/getColumns — omitted catalogName scopes to the session current catalog (see the coverage PR diff under tests/)
- METADATA-037 [sea]: SEA (kernel) getTables/getColumns with catalogName omitted also fans out across ALL catalogs instead of scoping to the session's current catalog — observed 4 rows where the current catalog holds 2
- failing test:
getTables/getColumns — omitted catalogName scopes to the session current catalog (see the coverage PR diff under tests/)
- METADATA-038 [thrift]: No current catalog is substituted for an omitted catalogName, so nothing is escaped as a literal: with the current catalog set to an underscore-bearing name the listing still returns the sibling catalog's table (2 rows instead of 1)
- failing test:
getTables — current catalog substituted for an omitted catalogName is matched as a literal (see the coverage PR diff under tests/)
- METADATA-038 [sea]: SEA likewise performs no current-catalog substitution for an omitted catalogName (its catalog argument is an exact identifier, so the escaped-explicit control returns 0 rows), and the omitted-catalog listing still returns the sibling catalog's table (2 rows instead of 1)
- failing test:
getTables — current catalog substituted for an omitted catalogName is matched as a literal (see the coverage PR diff under tests/)
- METADATA-037: getTables/getColumns with catalogName omitted fans out across ALL catalogs instead of scoping to the session's current catalog (initialCatalog), leaking cross-catalog rows and reproducing the all-catalogs cost regression (PECOBLR-2200); observed 4 rows where the current catalog holds 2, on both thrift and sea
- METADATA-038: no current catalog is substituted for an omitted catalogName, so the resolved catalog is never escaped as a literal; with the current catalog set to an underscore-bearing name the listing still returns the sibling catalog's table (2 rows instead of 1) on both thrift and sea
Reproduce & Expected
METADATA-037 — Validates that when the CATALOG argument of a pattern-mode catalog function is OMITTED (NULL), the driver scopes the search to the connection's CURRENT catalog — not to every catalog in the metastore.
Reproduce:
- Explicit current-catalog calls — the reference results the omitted-catalog calls
must reproduce exactly.
tables(catalog={tempCatalogA}, schema={S}, table="{prefix}_%") -> 2 rows
columns(catalog={tempCatalogA}, schema={S}, table="{prefix}_dup", column=null)
-> 1 column (id)
Keep both row counts for the equality assertions below.
- Repeat both calls with the catalog argument OMITTED (NULL) and nothing else changed.
- Control — an EXPLICIT catalog-B table listing, proving {prefix}_b and catalog B's
extra column are discoverable, so their absence above is scoping and not a fixture
gap. (A driver that also exposes an all-catalogs form may additionally show that
form returns 4 rows where the omitted-catalog call returns 2.)
Expected (per the shared spec):
- Both omitted-catalog calls complete successfully (no error, no timeout)
- Table listing with the catalog OMITTED returns exactly the current catalog's 2 matching tables — identical to the explicit current-catalog baseline, NOT the 4 rows an all-catalogs search over both fixture catalogs would return.
- Both of catalog A's matching tables are returned.
- Catalog B's matching table must NOT appear — the omitted catalog did not fan out. The explicit catalog-B control call DOES return it.
- Every row of the omitted-catalog result reports the CURRENT catalog (catalog A); no row from any other catalog is present. Drivers whose result omits a catalog column satisfy this via the name assertions above.
- Column listing with the catalog OMITTED for {S}.{prefix}_dup returns exactly the current catalog's 1 column — identical to the explicit current-catalog baseline. Catalog B's same-named table has 2 columns, so a fan-out would return 3.
- No column of catalog B's same-named table leaks into the omitted-catalog column listing.
METADATA-038 — Validates that the current catalog substituted for an OMITTED catalog argument (METADATA-037) is matched as a LITERAL, not re-interpreted as a pattern: wildcard metacharacters in the catalog's own NA…
Reproduce:
- Two explicit controls, same schema/table filters throughout
(schema={S}, table="{q}_%"):
RAW pattern catalog="t{p}lit" -> the unescaped "" is a wildcard, so BOTH
catalogs match: 2 rows ({q}_one, {q}_two)
ESCAPED catalog="t{p}_lit" -> literal: 1 row ({q}_one)
If the RAW call returns only 1 row the driver treats the catalog argument as an
exact identifier rather than a pattern; skip the RAW comparison and keep the
equality against the ESCAPED result (see notes).
Keep both row counts for the comparisons below.
- Repeat with the catalog argument OMITTED (NULL) — the driver substitutes the current
catalog, which must be escaped as a literal.
Expected (per the shared spec):
- All three listings complete successfully
- The omitted-catalog listing returns exactly 1 row — equal to the ESCAPED-explicit baseline and strictly fewer than the RAW-pattern baseline (2): the substituted catalog was matched literally, not wildcard-expanded.
- The current (underscore-bearing) catalog's own table is returned.
- The sibling catalog, which the UNESCAPED "_" would have matched (and which the RAW control call does return), must NOT appear.
- Every returned row reports the underscore-bearing current catalog — no sibling- catalog row is present.
Context
Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-nodejs. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-nodejs) is fixed, then flips green as a tripwire.
Findings
getTables/getColumns — omitted catalogName scopes to the session current catalog(see the coverage PR diff undertests/)getTables/getColumns — omitted catalogName scopes to the session current catalog(see the coverage PR diff undertests/)getTables — current catalog substituted for an omitted catalogName is matched as a literal(see the coverage PR diff undertests/)getTables — current catalog substituted for an omitted catalogName is matched as a literal(see the coverage PR diff undertests/)Reproduce & Expected
METADATA-037 — Validates that when the CATALOG argument of a pattern-mode catalog function is OMITTED (NULL), the driver scopes the search to the connection's CURRENT catalog — not to every catalog in the metastore.
Reproduce:
must reproduce exactly.
tables(catalog={tempCatalogA}, schema={S}, table="{prefix}_%") -> 2 rows
columns(catalog={tempCatalogA}, schema={S}, table="{prefix}_dup", column=null)
-> 1 column (id)
Keep both row counts for the equality assertions below.
extra column are discoverable, so their absence above is scoping and not a fixture
gap. (A driver that also exposes an all-catalogs form may additionally show that
form returns 4 rows where the omitted-catalog call returns 2.)
Expected (per the shared spec):
METADATA-038 — Validates that the current catalog substituted for an OMITTED catalog argument (METADATA-037) is matched as a LITERAL, not re-interpreted as a pattern: wildcard metacharacters in the catalog's own NA…
Reproduce:
(schema={S}, table="{q}_%"):
RAW pattern catalog="t{p}lit" -> the unescaped "" is a wildcard, so BOTH
catalogs match: 2 rows ({q}_one, {q}_two)
ESCAPED catalog="t{p}_lit" -> literal: 1 row ({q}_one)
If the RAW call returns only 1 row the driver treats the catalog argument as an
exact identifier rather than a pattern; skip the RAW comparison and keep the
equality against the ESCAPED result (see notes).
Keep both row counts for the comparisons below.
catalog, which must be escaped as a literal.
Expected (per the shared spec):
Context