Skip to content

Conversation

@nightscape
Copy link
Contributor

Hi @okennedy, here comes the big one 😄

This PR introduces comprehensive multi-dialect support and a powerful CLI application for parsing SQL files.

Key Features

Multi-Dialect Support

  • Oracle SQL, PostgreSQL, and ANSI SQL dialects
  • Extensible parser architecture allowing easy addition of new dialects
  • Dialect-specific parsing rules and syntax handling

CLI Application

  • Parse SQL files with configurable output formats (text, JSON, JQ queries)
  • Glob pattern support for batch processing
  • Error recovery for unparseable statements with accurate line number tracking
  • Flexible output destinations (console or file)

Architecture Improvements

  • Refactored package structure under sparsity.common.* for better organization
  • Moved parser logic from Elements to SQLBase for better extensibility
  • Added Circe-based JSON encoding for all AST types

Build System

  • Updated to SBT 1.11.7 with assembly plugin for standalone JARs
  • Cross-compilation for Scala 2.12, 2.13, and 3.3
  • Added scalafmt for consistent code formatting

Breaking Changes

The package structure has been reorganized:

  • Core types moved to sparsity.common.*
  • Parser classes in sparsity.common.parser.*
  • Dialect-specific implementations in separate packages

Testing

Comprehensive test suite including Oracle-specific tests with real-world SQL examples.

@nightscape nightscape force-pushed the dialects branch 4 times, most recently from 2c10a5a to 3d188c7 Compare December 1, 2025 11:59
@okennedy
Copy link
Member

Sorry for the delay. End of semester is sucking up a lot of my time. I will get to this soon™.

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.

2 participants