Skip to content

Conversation

@dlazin
Copy link
Contributor

@dlazin dlazin commented Nov 20, 2024

Google has a dialect of SQL known as GoogleSQL (formerly ZetaSQL), used in BigQuery and other products. It is documented at https://cloud.google.com/bigquery/googlesql.

Resolves #2814.

@amitkummer
Copy link
Contributor

I see tests are missing, could you add some? These are the instructions: https://pygments.org/docs/lexerdevelopment/#how-to-test-your-lexer

@dlazin
Copy link
Contributor Author

dlazin commented Nov 26, 2024

I see tests are missing, could you add some?

Done! The test is minimal, but the primary difference in GoogleSQL is a bunch of new keywords (functions), and the golden looks good for those. Thanks.

@amitkummer
Copy link
Contributor

Nice, thanks for being so quick! LGTM 👍

@dlazin
Copy link
Contributor Author

dlazin commented Nov 27, 2024

Nice, thanks for being so quick! LGTM 👍

Thank you too. I don't know what your standards/process is for merging, but if you can merge, I have a couple followup PRs that clean up and improve sql.py, but they will definitely cause conflicts with this one so I'm waiting until after merge.

@Anteru Anteru added this to the 2.19.0 milestone Jan 5, 2025
@Anteru Anteru added the A-lexing area: changes to individual lexers label Jan 5, 2025
@Anteru
Copy link
Collaborator

Anteru commented Jan 5, 2025

Merged for 2.19, thanks!

@Anteru Anteru merged commit 6e0c5a2 into pygments:master Jan 5, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lexing area: changes to individual lexers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add lexer for GoogleSQL/ZetaSQL

3 participants