Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JPQL parser issues with numeric values #3280

Closed
wants to merge 9 commits into from
Closed

Conversation

christophstrobl
Copy link
Member

@christophstrobl christophstrobl commented Dec 20, 2023

Fixes: #3277
Fixes: #3308

@@ -0,0 +1,45 @@
/*
* Copyright 2023 the original author or authors.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: 2024

Copy link
Member Author

Choose a reason for hiding this comment

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

3 weeks ago this had been valid ;) - I'll change after rebase.

/**
* @author Christoph Strobl
*/
public abstract class SqlParserTests {
Copy link
Member

Choose a reason for hiding this comment

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

How about JpqlParserAndRenderTests?

The samples used to validate MOD parsing in tests does not comply with the specification and falsely uses '/' instead of ',' as delimiter.

Definition is: expression ::= MOD(arithmetic_expression, arithmetic_expression)

See: https://eclipse.dev/eclipselink/api/4.0/eclipselink/org/eclipse/persistence/jpa/jpql/parser/ModExpression.html
Allow using java string literals using escaped double quotes next to single quoted values.
@christophstrobl christophstrobl marked this pull request as ready for review January 10, 2024 10:19
@mp911de mp911de added the type: bug A general bug label Jan 10, 2024
@mp911de mp911de changed the title Fix jpql parser issues with numeric values. Fix JPQL parser issues with numeric values Jan 10, 2024
mp911de pushed a commit that referenced this pull request Jan 10, 2024
Closes #3308
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
mp911de added a commit that referenced this pull request Jan 10, 2024
Suppress debug output during test execution.

See #3277
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
Closes #3308
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
The samples used to validate MOD parsing in tests does not comply with the specification and falsely uses '/' instead of ',' as delimiter.

Definition is: expression ::= MOD(arithmetic_expression, arithmetic_expression)

See: https://eclipse.dev/eclipselink/api/4.0/eclipselink/org/eclipse/persistence/jpa/jpql/parser/ModExpression.html

Closes #3277
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
mp911de added a commit that referenced this pull request Jan 10, 2024
Suppress debug output during test execution.

See #3277
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
Closes #3308
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
The samples used to validate MOD parsing in tests does not comply with the specification and falsely uses '/' instead of ',' as delimiter.

Definition is: expression ::= MOD(arithmetic_expression, arithmetic_expression)

See: https://eclipse.dev/eclipselink/api/4.0/eclipselink/org/eclipse/persistence/jpa/jpql/parser/ModExpression.html

Closes #3277
Original pull request: #3280
mp911de pushed a commit that referenced this pull request Jan 10, 2024
mp911de added a commit that referenced this pull request Jan 10, 2024
Suppress debug output during test execution.

See #3277
Original pull request: #3280
@mp911de mp911de added this to the 3.1.8 (2023.0.8) milestone Jan 10, 2024
@mp911de mp911de closed this Jan 10, 2024
@mp911de mp911de deleted the issue/3277 branch January 10, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JPQL parser doesn't accept double-quoted string literals JPQL parser doesn't accept MOD(… , …)
2 participants