Skip to content

Conversation

@VaggelisD
Copy link
Collaborator

This PR refactors the annotation format by:

  • Migrating the annotators to a new typing/ directory; This will help remove noise from the dialects/ files as we're making each dialect more type-aware
  • Making the new format more expressive by moving from Expression -> Callable to Expression -> Dict which can carry additional state

@VaggelisD VaggelisD force-pushed the vaggelisd/refactor_type_inference branch from 5db214e to 5c9f559 Compare October 31, 2025 10:12
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Looks good, I'll eyeball the dialects locally as a sanity check. Let's benchmark this and then discuss what name to use instead of "expression spec".

@georgesittas
Copy link
Collaborator

/benchmark

@github-actions
Copy link
Contributor

Benchmark Results

Legend:

  • 🟢🟢 = 2x+ faster
  • 🟢 = 1.1x - 2x faster
  • ⚪ = No significant change (< 1.1x)
  • 🔴 = 1.1x - 2x slower
  • 🔴🔴 = 2x+ slower

Parsing Benchmark

Benchmark bench_parse_main bench_parse_pr
parse_sqlglot_tpch 5.48 ms 5.51 ms: ⚪ 1.00x slower
parse_sqlglot_crazy 15.3 ms 15.5 ms: ⚪ 1.01x slower
Geometric mean (ref) 1.00x slower

Benchmark hidden because not significant (6): parse_sqlglot_short, parse_sqlglot_long, parse_sqlglotrs_tpch, parse_sqlglotrs_short, parse_sqlglotrs_long, parse_sqlglotrs_crazy


Optimization Benchmark

Benchmark hidden because not significant (4): optimize_tpch, optimize_condition_10, optimize_condition_100, optimize_condition_1000

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.

3 participants