Skip to content

Conversation

@tkaunlaky-e6
Copy link

##Summary

  • Enable Rust tokenizer (sqlglotrs) for improved SQL parsing performance
  • Add ASCII fast path optimization for normalize_unicode_spaces providing 1200x speedup
  • Add ENABLE_UNICODE_NORMALIZATION feature flag for per-request control
  • Update Docker configuration with Rust toolchain

Docker Changes

  • Install Rust toolchain via rustup for building sqlglotrs
  • Add maturin for Python-Rust binding compilation
  • Build and install sqlglotrs wheel during image creation
  • Set environment variables to enable Rust tokenizer by default
  • Container now includes both Python and Rust tokenizer capabilities

Performance Improvements

  • ASCII queries (95%): 12ms → 0.01ms with fast path optimization
  • Unicode normalization now skips ASCII-only strings entirely
  • Rust tokenizer provides faster parsing for complex queries

converter_api.py Outdated
try:
import sqlglotrs
os.environ["SQLGLOTRS_TOKENIZER"] = "1"
print("✅ Rust tokenizer enabled")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print statements. Add logger for errors

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