Add CREATE JOB DDL#215
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>
|
@copilot please resolve merge conflicts |
…CREATE JOB and CREATE DATABASE DDL additions Co-authored-by: ryannedolan <1387539+ryannedolan@users.noreply.github.com>
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>
|
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>
|
|
||
| // Split SQL body on semicolons into individual statements | ||
| List<String> sqlStatements = new ArrayList<>(); | ||
| for (String stmt : sqlBody.split(";")) { |
There was a problem hiding this comment.
guess this split(";") may create edge-case conditions for any ';' character inside a Flink connector option value. noticed this since we saw something similar here, https://github.com/linkedin/Hoptimator/pull/199/changes
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: