Conversation
sqlparser-rs instead of sea-querysqlparser-rs instead of sea-query
- Completely separated native (Rust) implementation from Python layer - Restructured project architecture for better maintainability and development experience - Improved test coverage and accuracy across DataType, Serializers, and Dialects - Reduced memory consumption through interning and optimization of common data types - Observed overall performance improvements
sqlparser-rs instead of sea-querysqlparser-rs (instead of sea-query)
prepare foundation Rewrite SqlDialect string/identifier/bytes/bits formatting to write into any fmt::Write instead of always allocating Strings. Add matching *_as_string helpers for call sites that still need owned values. Introduce efficient single-pass string utilities (str_replace_to, replace_many_ascii_to) and reorganize internal utils into a module. Add PrepareStatement trait + PrepareStatementContext for building parameterized SQL, plus Ident/CompoundIdent and a PrepareStatement impl for DataTypeName. Bump edition to 2024, add once_cell + hashbrown, and update serializers to the new dialect APIs.
- Change Ident from ArcStr newtype to Content | Asterisk enum - Add IdentList for multipart (dotted) identifiers with parsing/validation - Integrate escape + quote into dialect.escape_identifier(..., quote) - Update PrepareStatement trait and helpers to take dialect explicitly - Expose Ident and Asterisk to Python (Asterisk subclasses Ident) - Add derive_more dependency; support Python 3.14/3.15 classifiers - Misc: typeref check helpers, FmtError, serializer exact-type checks
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.
Based on feedback received from my friends, I decided to migrate to a customizedsqlparser-rs.Initially, the plan was to migrate directly to a customized version of
sqlparser-rs. However, after further investigation, direct usage was not feasible.Instead, I'm taking strong inspiration from
sqlparser-rswhile implementing our own solution tailored to the needs of this library.Reasons:
Complete elimination of panic risks and much higher production safety compared to
sea-querySupport for more than 10 dialects:
BigQueryDataBricksDuckDBHiveMsSQLMySQLOraclePostgreSQLRedShiftSnowflakeSparkSQLiteTeraDataSupport for all data types.
This opens the door to adding SQL parsing capabilities in the future.
I will be able to offer a better and more complete interface to developers.
All SQL features become available without any limitations.
This greatly simplifies building an ORM and keeps options open.
I'll try to keep this update as backward-compatible as possible, but I can't make any guarantees.