refactor: Extract deployment file model classes to sqrl-deployment-model - #2238
Merged
Conversation
ferenc-csaky
force-pushed
the
refactor/sqrl-deployment-model
branch
3 times, most recently
from
July 29, 2026 13:25
5022f9a to
d888abc
Compare
ferenc-csaky
requested review from
mateczagany,
mbroecheler and
velo
and removed request for
velo
July 29, 2026 13:31
…odel` Co-authored-by: Marvin Froeder <marvin@datasqrl.com>
ferenc-csaky
force-pushed
the
refactor/sqrl-deployment-model
branch
from
July 29, 2026 13:40
d888abc to
70671a9
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2238 +/- ##
============================================
+ Coverage 17.13% 17.44% +0.30%
- Complexity 1054 1072 +18
============================================
Files 613 612 -1
Lines 17802 17807 +5
Branches 2166 2167 +1
============================================
+ Hits 3051 3107 +56
+ Misses 14435 14382 -53
- Partials 316 318 +2 ☔ View full report in Codecov by Harness. |
velo
approved these changes
Jul 29, 2026
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
Extract deployment-file models into a dependency-light
sqrl-deployment-modelmodule. Deployment JSON is now produced from explicit file models rather than planner physical plans, keeping compiler state and persisted contracts separate.Motivation
Deployment-file consumers should not require Calcite, Flink, or planner implementation dependencies. Persisting physical plans also exposes compiler-only state and can accidentally serialize unsupported runtime types.
Implementation
sqrl-deployment-modelMaven module, limited to JDK types and Jackson annotations.CombinedPlanModel,FlinkPlanModel,JdbcPlanModel,JdbcStatementModel,KafkaPlanModel,KafkaNewTopicModel, andMutationDatabaseModel.EnginePhysicalPlan.toFileModel()and updatePackagerto serialize that representation.planswrapper while mapping every nested plan to its file model. This prevents Jackson from traversing CalciteRelDataTypeinstances during deployment serialization.sqrl-planner;KafkaNewTopicremains theEngineCreateTablewrapper around the deployment DTO.MutationDatabaseModel.postgres.json,kafka.json, and mutation-database output.Compatibility
planswrapper.KafkaPlanModel.isEmpty()as ignored sokafka.jsononly containstopicsandtestRunnerTopics.TestPlan.jdbcViewsasGenericJdbcStatement.Testing
PlanModelSerializationTestto cover JDBC generic, CREATE TABLE, and extension statements; Flink fields; Kafka topic mapping/defaults; Kafka JSON properties; and combined-plan serialization containing a CalciteBIGINTtype.TestPlan.jdbcViews.