Skip to content

Improve MSSQL analysis and diagnostic exports - #70

Closed
dvasdekis wants to merge 7 commits into
pondpilot:masterfrom
dvasdekis:pre_66
Closed

dvasdekis wants to merge 7 commits into
pondpilot:masterfrom
dvasdekis:pre_66

Conversation

@dvasdekis

@dvasdekis dvasdekis commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Promote the completed pre_66 stack into pondpilot/flowscope:master.

This PR consolidates the investigation-driven fixes for the MSSQL/Synapse corpus and preserves diagnostic metadata across the core, CLI, WASM, and report-export boundaries.

Changes

MSSQL and SQL analysis

  • Handle trailing, repeated, case-insensitive, and CRLF MSSQL GO batch separators.
  • Preserve statement ranges and WASM analysis/statement-splitting behavior around GO.
  • Track parsed QUALIFY predicates as structured QUALIFY filters.
  • Preserve source references from parsed OPENJSON and XMLTABLE table factors in the legacy extractor.

Diagnostics and metadata

  • Normalize multi-file lint statement indices to the global AnalyzeResult statement identity.
  • Attach source names to lint and statement-scoped issues.
  • Preserve structured lint metadata and autofix data in CLI JSON output.
  • Synchronize the API schema, generated TypeScript types, and issue documentation.

WASM and exports

  • Fix the WASM export request boundary to deserialize the TypeScript projectName and exportedAt fields.
  • Add native regression coverage for the WASM export payload contract.
  • Preserve source, statement, span, lint provenance, and autofix metadata in HTML and CSV exports.
  • Add an Issues worksheet to XLSX exports while preserving existing worksheet names and order.
  • Add escaping and serialization regressions for rich issue data.

Deliberate scope boundaries

  • Standard Synapse OPENROWSET grammar is not claimed here; sqlparser still needs dedicated upstream grammar/AST support for the documented forms.
  • No new public synapse dialect is introduced; Synapse-compatible syntax remains under the existing MSSQL dialect.
  • Full PIVOT/UNPIVOT generated-column semantics, dynamic EXECUTE lineage, and complete external-rowset schema inference remain follow-up work.

Validation

Focused validation completed during the stack:

  • cargo fmt --all
  • cargo test --locked -p flowscope-core --test schema_guard api_schema_snapshot_matches -- --nocapture
  • cargo test --locked -p flowscope-core --test lineage_engine snowflake_qualify_clause_filters_window_results -- --nocapture
  • cargo test --locked -p flowscope-core --test lineage_engine openjson_table_factor_sql_server -- --nocapture
  • cargo test --locked -p flowscope-core --lib extractors::tests -- --nocapture
  • cargo test --locked -p flowscope-export --test export_formats --no-default-features
  • cargo test --locked -p flowscope-wasm --test analysis -- --nocapture

The browser WASM harness was added but not run in the development container because Chromium/wasm-pack were unavailable. CI should run the normal workspace checks before merge.

Fixes #68

@dvasdekis dvasdekis changed the title Pre 66 Improve MSSQL analysis and diagnostic exports Sep 16, 2026
@dvasdekis dvasdekis closed this Sep 16, 2026
@dvasdekis

Copy link
Copy Markdown
Contributor Author

oops, sorry, not yet ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release and verify MSSQL GO batch support in the published npm/WASM package

1 participant