Skip to content

Conversation

h-rajagopal
Copy link

This pull request introduces support for the standard JPA CAST function syntax with the AS keyword, alongside tests to validate the new functionality. It also removes the unused UNION keyword from the grammar. Below is a summary of the most important changes:

Enhancements to CAST Functionality

  • Updated the CAST function grammar in Eql.g4 to support the standard JPA syntax: CAST(expression AS type) with optional numeric literals for precision.
  • Modified EqlQueryRenderer.java to handle the new CAST syntax while maintaining backward compatibility with the original EclipseLink syntax.

Grammar Cleanup

  • Removed the unused UNION keyword from the Eql.g4 grammar.

Testing

  • Added a new integration test class, CastFunctionIntegrationTests, to verify the standard JPA CAST syntax in real-world scenarios.
  • Added test cases in EqlComplianceTests to validate the CAST function with various data types and precision.
  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Enhance EQL support for standard JPA CAST syntax. Update Eql.g4 to include new CAST format and modify EqlQueryRenderer to handle both standard and original CAST syntaxes. Add tests for standard JPA CAST syntax in EqlComplianceTests.

Signed-off-by: Hari Ohm Prasath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants