Skip to content

AbstractSqlPagingQueryProvider Does Not Handle Whitespace Besides the Space Character When Removing Keywords [BATCH-2849] #765

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

Closed
spring-projects-issues opened this issue Oct 17, 2019 · 1 comment
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: infrastructure type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

BenjaminHetzjelli opened BATCH-2849 and commented

The current implementation of AbstractSqlPagingQueryProvider trims keywords, but only if they are followed immediately by a space character.

 

In cases where the keyword is followed by a different whitespace character, the keyword is not removed and a sql syntax error is thrown upon use. Treating other whitespace characters the same as the space character will allow for more flexibility in how users can supply SQL to the query provider.


No further details from BATCH-2849

@spring-projects-issues
Copy link
Collaborator Author

BenjaminHetzjelli commented

Pull Request for possible fix is here:

#738

@fmbenhassine fmbenhassine added type: bug and removed status: waiting-for-triage Issues that we did not analyse yet type: enhancement labels Feb 28, 2020
@fmbenhassine fmbenhassine added this to the 4.3.0 milestone Feb 28, 2020
@fmbenhassine fmbenhassine added the has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" label Feb 28, 2020
fmbenhassine pushed a commit to fmbenhassine/spring-batch that referenced this issue Mar 4, 2020
Modify `removeKeyWord(...)` such that the keyword is removed regardless
of what kind of whitespace follows. This is especially useful for those
who read in SQL from a file which has been formatted such that keywords
live on their own lines.

Added unit tests for trimming whitespace.

Resolves spring-projects#765
fmbenhassine pushed a commit to fmbenhassine/spring-batch that referenced this issue Mar 4, 2020
Modify `removeKeyWord(...)` such that the keyword is removed regardless
of what kind of whitespace follows. This is especially useful for those
who read in SQL from a file which has been formatted such that keywords
live on their own lines.

Added unit tests for trimming whitespace.

Resolves spring-projects#765
dimitrisli pushed a commit to dimitrisli/spring-batch that referenced this issue Apr 18, 2020
Modify `removeKeyWord(...)` such that the keyword is removed regardless
of what kind of whitespace follows. This is especially useful for those
who read in SQL from a file which has been formatted such that keywords
live on their own lines.

Added unit tests for trimming whitespace.

Resolves spring-projects#765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: infrastructure type: bug
Projects
None yet
Development

No branches or pull requests

2 participants