Skip to content

feat: Support referencing individual tables from SQRL scripts in IMPORT and EXPORT#2218

Merged
ferenc-csaky merged 6 commits into
mainfrom
feat/individual-table-import+export
Jul 22, 2026
Merged

feat: Support referencing individual tables from SQRL scripts in IMPORT and EXPORT#2218
ferenc-csaky merged 6 commits into
mainfrom
feat/individual-table-import+export

Conversation

@ferenc-csaky

@ferenc-csaky ferenc-csaky commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Key Changes

  • Improve parseScript with filterable output, so we can easily collect CREATE TABLE statements from scripts
  • When an individual table is referenced from a ScriptSqrlModule, load the tables in a lazy manner (once), and return it if it's defined in the script
  • Created FlinkCalciteParser and moved the Flink calcite parser init there, cause now we need that in two places
  • Added proper error message when an internal table is referenced from another script
  • Added DAG planner tests to cover the added logic
  • Updates some usecases to cover both IMPORT and EXPORT usage

TODO

  • Add test(s) for IMPORT
  • Update docs

@ferenc-csaky ferenc-csaky added this to the 0.11.0 milestone Jul 16, 2026
@ferenc-csaky ferenc-csaky added the enhancement New feature or request label Jul 16, 2026
@ferenc-csaky
ferenc-csaky force-pushed the feat/individual-table-import+export branch 2 times, most recently from fa99107 to d165b66 Compare July 17, 2026 15:15
@ferenc-csaky
ferenc-csaky marked this pull request as ready for review July 17, 2026 15:15
@ferenc-csaky
ferenc-csaky force-pushed the feat/individual-table-import+export branch from d165b66 to d24aac3 Compare July 17, 2026 15:20
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 1.63934% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.44%. Comparing base (f90a253) to head (c034189).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...in/java/com/datasqrl/loaders/ScriptSqrlModule.java 0.00% 27 Missing ⚠️
...tasqrl/engine/stream/flink/FlinkCalciteParser.java 0.00% 15 Missing ⚠️
...m/datasqrl/planner/parser/SqrlStatementParser.java 0.00% 7 Missing ⚠️
...in/java/com/datasqrl/loaders/ModuleLoaderImpl.java 0.00% 4 Missing ⚠️
...in/java/com/datasqrl/planner/SqlScriptPlanner.java 0.00% 3 Missing ⚠️
...java/com/datasqrl/loaders/DirectorySqrlModule.java 0.00% 2 Missing ⚠️
...om/datasqrl/loaders/FlinkTableNamespaceObject.java 0.00% 1 Missing ⚠️
.../com/datasqrl/planner/Sqrl2FlinkSQLTranslator.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2218      +/-   ##
============================================
- Coverage     16.47%   16.44%   -0.03%     
  Complexity     1034     1034              
============================================
  Files           622      623       +1     
  Lines         17951    17983      +32     
  Branches       2193     2197       +4     
============================================
+ Hits           2957     2958       +1     
- Misses        14689    14720      +31     
  Partials        305      305              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

ferenc-csaky and others added 2 commits July 22, 2026 12:51
…inkCalciteParser.java

Co-authored-by: Mate Czagany <4469996+mateczagany@users.noreply.github.com>
Signed-off-by: Ferenc Csaky <ferenc.csaky@pm.me>
@ferenc-csaky
ferenc-csaky merged commit 073ad08 into main Jul 22, 2026
14 checks passed
@ferenc-csaky
ferenc-csaky deleted the feat/individual-table-import+export branch July 22, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants