Add CREATE JOB DDL#215
Open
ryannedolan wants to merge 13 commits intomainfrom
Open
Conversation
Introduces CREATE [OR REPLACE] DATABASE <name> [WITH (...)] syntax that deploys a Database CRD to Kubernetes via the Deployer pattern. Includes parser, executor, shared processCreateDatabase util, K8sDatabaseDeployer, and quidem test with !specify support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduces CREATE JOB syntax that deploys a SqlJob CRD to Kubernetes via the Deployer pattern. Supports optional FLINK dialect and STREAMING/BATCH execution mode keywords, SQL body as a string literal, and WITH options for configs. Since JOB/FLINK/STREAMING/BATCH are not parser tokens, the grammar uses IDENTIFIER matching with text checks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the IDENTIFIER-matching hack with properly generated parser tokens. Regenerated all three parser files (Impl, Constants, TokenManager) from Calcite 1.41.0 codegen using the updated config.fmpp and parserImpls.ftl templates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SQL parser uppercases unquoted identifiers, so WITH (url '...') produces key "URL". Use a case-insensitive TreeMap in K8sDatabaseDeployer and fix expected config key casing in the CREATE JOB quidem test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SnakeYAML serializes Java enums by name (MYSQL) not value (MySQL). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
@copilot please resolve merge conflicts |
Collaborator
Author
…CREATE JOB and CREATE DATABASE DDL additions Co-authored-by: ryannedolan <1387539+ryannedolan@users.noreply.github.com>
Contributor
Resolved in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…teJob, K8sDeployerProvider)" Agent-Logs-Url: https://github.com/linkedin/Hoptimator/sessions/4fdc6aed-fd8d-4af3-bbf0-a706fba9773b Co-authored-by: ryannedolan <1387539+ryannedolan@users.noreply.github.com>
…anatory comments Agent-Logs-Url: https://github.com/linkedin/Hoptimator/sessions/4fdc6aed-fd8d-4af3-bbf0-a706fba9773b Co-authored-by: ryannedolan <1387539+ryannedolan@users.noreply.github.com>
Contributor
|
Added in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Code Coverage
|
SnakeYAML's RepresentEnum uses Enum.name() — the Java constant name — rather than toString(), which the generated model enums override to return the CRD-defined string value. Replace Yaml.dump() in K8sDeployer.specify() with a custom SnakeYAML representer that uses toString() for enums, preserving the kubernetes client's null-skipping and alphabetical-sort behaviors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The tests were asserting FLINK/BATCH (Enum.name()) and had comments explaining this was broken behavior. Update them to assert Flink/Batch (Enum.toString() / CRD value) now that dumpYaml() fixes enum serialization. Co-Authored-By: Claude Sonnet 4.6 <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
create jobddl.Details
Adds
create [or replace] [flink] [streaming | batch] job as 'insert into ... ' [with (... options ...)]statement. This enables automation to bypass Hoptimator's pipeline planner and create Flink jobs directly. This is particularly useful if the target Flink environment includes a pre-configured catalog, since in that case jobs can be simple one-liners.Testing Done
produces: