Skip to content

fix(napi): allow omitted foreign side in cross references - #371

Merged
vuanhphung merged 1 commit into
mainfrom
fix/napi-cross-reference-empty-foreign
Sep 28, 2026
Merged

vuanhphung merged 1 commit into
mainfrom
fix/napi-cross-reference-empty-foreign

Conversation

@vuanhphung

@vuanhphung vuanhphung commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Allow N-API getCrossReference calls to omit the foreign-key side. The binding now forwards optional foreign identifiers to the kernel core, which returns an empty result without issuing a server statement.

This only needs an N-API change because Node.js exposes getCrossReference publicly and its binding previously required all foreign identifiers. The C ABI already accepts nullable foreign pointers and forwards None to the core. PyO3 still requires the foreign side, but databricks-sql-python does not expose a cross-reference API, so this JDBC-compatible call shape is not reachable there.

This matches the JDBC SEA implementation: DatabricksMetadataQueryClient.

Tests: cargo test --locked --features dyn-symbols; cargo clippy --all-targets --locked -- -D warnings; cargo +stable fmt --all -- --check

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues identified by the review bot.

@vuanhphung vuanhphung added the integration-test Maintainer-only: triggers cross-repo integration tests. Auto-removed on push for re-review. label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

Kernel integration tests triggered. View status. Results post back here as the "Kernel Integration Tests" check.

@vuanhphung
vuanhphung added this pull request to the merge queue Sep 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 28, 2026
@vuanhphung
vuanhphung added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit dc30777 Sep 28, 2026
30 of 31 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 3cba3fe7 Deployed Sep 25, 2026 by vuanhphung via review #758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted integration-test Maintainer-only: triggers cross-repo integration tests. Auto-removed on push for re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants