Skip to content

feat(dialects): update dialect definitions#2080

Open
gvozdvmozgu wants to merge 12 commits intomainfrom
update-dialect-definitions
Open

feat(dialects): update dialect definitions#2080
gvozdvmozgu wants to merge 12 commits intomainfrom
update-dialect-definitions

Conversation

@gvozdvmozgu
Copy link
Collaborator

No description provided.

@github-actions
Copy link

Benchmark for 9c10b7c

Click to view benchmark
Test Base PR %
DepthMap::from_parent 54.1±0.77µs 53.9±0.72µs -0.37%
fix_complex_query 11.7±0.04ms 12.8±0.43ms +9.40%
fix_superlong 148.5±21.97ms 174.0±13.51ms +17.17%
parse_complex_query 4.2±0.05µs 4.5±0.06µs +7.14%
parse_expression_recursion 7.4±0.08µs 7.4±0.10µs 0.00%
parse_simple_query 1072.1±13.85ns 1358.8±34.17ns +26.74%

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from 27c1f3e to b550e59 Compare December 27, 2025 04:40
@github-actions
Copy link

Benchmark for b33f9ff

Click to view benchmark
Test Base PR %
DepthMap::from_parent 53.5±1.29µs 52.6±1.08µs -1.68%
fix_complex_query 11.9±0.19ms 12.4±0.07ms +4.20%
fix_superlong 178.6±17.11ms 160.4±12.34ms -10.19%
parse_complex_query 4.2±0.05µs 4.5±0.04µs +7.14%
parse_expression_recursion 7.3±0.11µs 7.3±0.10µs 0.00%
parse_simple_query 1066.7±26.00ns 1318.6±17.30ns +23.61%

@github-actions
Copy link

Benchmark for 4244061

Click to view benchmark
Test Base PR %
DepthMap::from_parent 54.6±0.68µs 54.5±1.25µs -0.18%
fix_complex_query 11.8±0.07ms 12.6±0.16ms +6.78%
fix_superlong 136.5±15.03ms 164.6±13.34ms +20.59%
parse_complex_query 4.2±0.05µs 4.5±0.06µs +7.14%
parse_expression_recursion 7.3±0.07µs 7.3±0.12µs 0.00%
parse_simple_query 1103.4±44.14ns 1323.8±12.02ns +19.97%

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from 4b4ba69 to d4991db Compare December 27, 2025 14:48
@github-actions
Copy link

Benchmark for 2507f80

Click to view benchmark
Test Base PR %
DepthMap::from_parent 55.5±1.02µs 52.9±4.08µs -4.68%
fix_complex_query 11.9±0.08ms 12.8±0.11ms +7.56%
fix_superlong 149.0±11.97ms 202.2±19.11ms +35.70%
parse_complex_query 4.2±0.24µs 4.5±0.06µs +7.14%
parse_expression_recursion 7.4±0.06µs 7.5±0.10µs +1.35%
parse_simple_query 1053.7±15.47ns 1350.6±23.64ns +28.18%

@github-actions
Copy link

Benchmark for c43629f

Click to view benchmark
Test Base PR %
DepthMap::from_parent 54.6±0.55µs 53.3±0.52µs -2.38%
fix_complex_query 11.8±0.15ms 12.4±0.11ms +5.08%
fix_superlong 142.4±14.75ms 176.1±13.79ms +23.67%
parse_complex_query 4.2±0.04µs 4.5±0.07µs +7.14%
parse_expression_recursion 7.4±0.11µs 7.4±0.12µs 0.00%
parse_simple_query 1211.0±13.70ns 1330.6±21.66ns +9.88%

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from f9da53a to 85df954 Compare December 28, 2025 02:52
@github-actions
Copy link

Benchmark for d2afb00

Click to view benchmark
Test Base PR %
DepthMap::from_parent 50.0±0.89µs 48.6±1.80µs -2.80%
fix_complex_query 11.3±0.05ms 12.1±0.15ms +7.08%
fix_superlong 180.8±17.27ms 209.0±9.01ms +15.60%
parse_complex_query 4.4±0.04µs 4.8±0.10µs +9.09%
parse_expression_recursion 7.2±0.12µs 7.4±0.12µs +2.78%
parse_simple_query 968.4±22.15ns 1250.8±47.88ns +29.16%

@benfdking
Copy link
Collaborator

I'd love to merge this but 200k lines might be hard to tackle in one go.

How do you think we should break this apart? I also am very keen to start diverging from sqlfluff in the sense that I think the grammar definitions should be more precise. For example, I think pgvector in Postgres should be an explicit setting.

My thought would be to tackle it dialect by dialect?

@gvozdvmozgu
Copy link
Collaborator Author

I don’t understand how to split this properly: if we change ANSI, we break other dialects. And if we start with the dialects that depend on ANSI, they will still require updating ANSI. I’ll try, but I think it’ll be pretty difficult.

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from 017efde to 85df954 Compare January 3, 2026 11:31
@github-actions
Copy link

github-actions bot commented Jan 3, 2026

Benchmark for 91b7c45

Click to view benchmark
Test Base PR %
DepthMap::from_parent 53.7±0.44µs 52.7±0.83µs -1.86%
fix_complex_query 11.8±0.03ms 12.4±0.05ms +5.08%
fix_superlong 137.1±13.14ms 165.2±10.98ms +20.50%
parse_complex_query 4.1±0.04µs 5.9±0.08µs +43.90%
parse_expression_recursion 7.3±0.07µs 10.3±0.13µs +41.10%
parse_simple_query 1062.8±9.84ns 1513.0±25.11ns +42.36%

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from 85df954 to 176462a Compare January 9, 2026 15:23
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 11, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 24.1%

Comparing update-dialect-definitions (b7ee6a8) with main (fa4187b)

Summary

❌ 2 regressed benchmarks
✅ 4 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
parse_simple_query 19.4 µs 25.6 µs -24.1%
parse_complex_query 44.7 µs 55.2 µs -19.06%

@github-actions
Copy link

Benchmark for 4e9b3a3

Click to view benchmark
Test Base PR %
DepthMap::from_parent 52.6±1.17µs 51.5±0.63µs -2.09%
fix_complex_query 12.4±0.07ms 12.4±0.17ms 0.00%
fix_superlong 157.0±4.44ms 156.5±9.52ms -0.32%
parse_complex_query 4.3±0.06µs 4.7±0.05µs +9.30%
parse_expression_recursion 7.4±0.09µs 7.5±0.07µs +1.35%
parse_simple_query 1043.6±29.00ns 1332.0±18.44ns +27.64%

@benfdking
Copy link
Collaborator

I've looked at ansi, all the fixtures look good. Is there any reason for the move away from vec_erased?

@gvozdvmozgu
Copy link
Collaborator Author

Lately, I’ve been thinking there isn’t much reason to keep vec_erased. Now that it’s gone, it seems like we could avoid type-erasing Matchable in a few places too, which might cut down on allocations overall.

I don’t feel strongly about it, but for now I’m leaning toward stripping out any extra sugar and dependencies so we can see the full picture and decide what to do next.

@benfdking
Copy link
Collaborator

I'm ok either way. Would it be possible (sorry if painful) to untangle that change from the dialect changes? I'm happy to do the removal of vec_erased in a separate pr and then you just need to rebase this?

@gvozdvmozgu gvozdvmozgu force-pushed the update-dialect-definitions branch from 37c2be3 to 8759028 Compare January 13, 2026 17:02
@github-actions
Copy link

Benchmark for bd4de78

Click to view benchmark
Test Base PR %
DepthMap::from_parent 51.9±0.82µs 53.2±0.87µs +2.50%
fix_complex_query 12.4±0.21ms 12.5±0.21ms +0.81%
fix_superlong 170.9±8.83ms 171.2±12.68ms +0.18%
parse_complex_query 4.2±0.06µs 4.6±0.10µs +9.52%
parse_expression_recursion 7.5±0.07µs 7.5±0.19µs 0.00%
parse_simple_query 1084.4±12.09ns 1348.9±45.76ns +24.39%

@github-actions
Copy link

Benchmark for 0a33e21

Click to view benchmark
Test Base PR %
DepthMap::from_parent 51.7±0.40µs 52.6±1.76µs +1.74%
fix_complex_query 12.4±0.09ms 12.4±0.15ms 0.00%
fix_superlong 165.1±5.93ms 187.9±14.78ms +13.81%
parse_complex_query 4.2±0.08µs 4.6±0.08µs +9.52%
parse_expression_recursion 7.5±0.11µs 7.6±0.10µs +1.33%
parse_simple_query 1077.0±18.66ns 1358.5±30.12ns +26.14%

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