Add CREATE TABLE ... WITH (...) support for ad-hoc K8s-stored tables#193
Draft
ryannedolan wants to merge 2 commits intomainfrom
Draft
Add CREATE TABLE ... WITH (...) support for ad-hoc K8s-stored tables#193ryannedolan wants to merge 2 commits intomainfrom
ryannedolan wants to merge 2 commits intomainfrom
Conversation
Enable users to define tables with explicit connector configuration that are stored as Table CRDs in Kubernetes, without requiring a pre-existing database or catalog entry. This is similar to Flink's CREATE TABLE. Syntax: CREATE TABLE foo.bar (id INT, name VARCHAR) WITH (connector 'kafka', topic 'my-topic') Key changes: - Custom SqlCreateTable replacing Calcite's built-in (adds options field) - Grammar/parser updated to accept WITH clause on CREATE TABLE - TableSource extends Source to carry column definitions + options - Table CRD (tables.crd.yaml) stores columns, options, and schema path - K8sStoredTable + StoredTableScanRule enables pure K8s tables in the planner pipeline without requiring a backing JDBC database - K8sConnector merges stored options with template-derived config (WITH options take precedence) - Fix !pipeline command to use query() for plain SELECTs (no sink) Safe to deploy without the Table CRD installed -- only CREATE TABLE WITH will fail; all other functionality is unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ryannedolan
commented
Feb 25, 2026
Comment on lines
+70
to
+71
| - table | ||
| - database |
Collaborator
Author
There was a problem hiding this comment.
I don't think database should be required. It looks like Claude is currently filling it in as DEFAULT, but it should be null in most cases. I think the only reason to include a database is if you explicitly want to opt-in to connector configuration from a database-specific TableTemplate.
Collaborator
Author
There was a problem hiding this comment.
I think database should be null in this case?
Tables created without a physical database backing (e.g. `CREATE TABLE foo (...)`) now have a null database rather than incorrectly using the schema name. This better represents that the table is a pure K8s table. - DDL executor sets database=null when schema is not a Database - Table CRD no longer requires the database field - K8sTableTable loads tables without a database - K8sConnector falls back to schema name for template name variable - VeniceDeployerProvider is now null-safe on source.database() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TableCRD.create table ... withDDL.Details
Currently, all tables must exist within a
Database, backed by a JDBC driver. Often, we want to point to a table-like object that doesn't exist in the catalog, or that differs appreciably from a table in the catalog. For this reason, we addcreate table ... with, which lets users add connector configuration to the catalog directly. Such tables exist in the catalog but do not necessarily have a physicalDatabaseassociated with them. The pipeline planner simply injects whatever configuration is provided in thewithclause, plus any configuration from matchingTableTemplates.Testing Done