8000 [BUG] Reject SQL statements with invalid namespaces by eddiethedean · Pull Request #61 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

[BUG] Reject SQL statements with invalid namespaces - #61

Merged
dmux merged 6 commits into
dmux:mainfrom
eddiethedean:fix/sql-invalid-namespace-55
Oct 28, 2026
Merged

dmux merged 6 commits into
dmux:mainfrom
eddiethedean:fix/sql-invalid-namespace-55

Conversation

@eddiethedean
@eddiethedean eddiethedean commented Oct 25, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

Reject SQL statements with invalid explicit namespaces, including empty values. Catalog-only requests target the requested catalog's main schema explicitly, so a same-named schema in the connection's current catalog cannot redirect the statement.

Closes #55

Changes

  • Propagate namespace selection failures as a clear INVALID_PARAMETER_VALUE statement error.
  • Validate requested catalog names against the Unity Catalog registry before namespace selection; retain the built-in unity_catalog namespace.
  • Reject empty catalog and schema values rather than treating them as omitted.
  • Use a fully qualified catalog and schema for namespace selection to avoid DuckDB resolving a catalog name as a schema in the previous catalog.
  • Validate explicit namespaces before external Delta registration and external Delta writes.
  • Resolve INSERT ... SELECT source rows under the requested namespace while holding the shared connection lock, then restore the prior namespace before Spark writes.
  • Add SDK regressions for invalid and empty catalog/schema values, catalog/schema name collisions, and external Delta DML; assert rows remain intact or writes reach the requested catalog.

Validation

  • Docker-backed namespace and external Delta regressions: 31 passed.
  • Docker-backed normal external Delta INSERT and SQL INSERT cases: 3 passed.
  • uv run ruff check and uv run ruff format --check on changed files.
  • git diff --check

@eddiethedean
Copy link
Copy Markdown
Collaborator Author

Reviewed the full PR. No high or critical findings remain, the Docker-backed SQL/Delta tests and additional SDK checks pass, and CI is green. This PR is ready to merge.

@dmux dmux self-assigned this Oct 28, 2026
@dmux dmux added the bug Something isn't working label Oct 28, 2026
@dmux
dmux merged commit 49d7568 into dmux:main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Invalid SQL catalog or schema silently executes destructive statements in the previous namespace

2 participants

0