-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Support AMQP SQL Filter Expressions #14184
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
Draft
ansd
wants to merge
18
commits into
main
Choose a base branch
from
amqp-sql
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,311
−3,160
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
614e14f
to
b1a052e
Compare
Instead of the JMS message selector syntax, support a subset of the AMQP SQL Filter Expressions syntax as defined in [AMQP Filter Expressions Version 1.0 Committee Specification Draft 01](https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929276). This commit changes the descriptors.
"A partner MAY indicate support and yet it MAY still refuse to accept certain filters or combination of filters for some scenarios."
[NOT] BETWEEN operator is not supported in AMQP SQL
The spec is underspecified in what should happen if the left hand side is a float. This commit decides that the result is undefined (unknown). The spec is also underspecified in what should happen if either the left hand side or the right hand side is negative. This commit decides to use the behaviour of Erlang `rem`.
AMQP SQL spec: "The left operand is of greater value than the right operand if: ... both operands are of type string or of type symbol (any combination is permitted) and the lexicographical rank of the left operand is greater than the lexicographical rank of the right operand." In contrast, in JMS: "String [...] comparison is restricted to = and <>."
Allow only upper case predefined selector literals and operator names. The JMS spec states: > Predefined selector literals and operator names are written here in upper case; however, they are case insensitive. However, the AMQP SQL spec does not include such a statement. The EBNF notation with single quotes ('AND') typically implies exact literal matching. This commit follows the AMQP SQL's EBNF notation and therefore disallows lower case predefined selector literals or operator names.
JMS: > A string literal is enclosed in single quotes, with an included single quote represented > by doubled single quote; for example, 'literal' and 'literal''s'. AMQP SQL https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929302 > A string constant is a string of arbitrary text consisting of any valid printable Unicode > characters surrounded by single or double quotation marks. A quotation mark inside the > string is represented by two consecutive quotation marks. > string_constant ::= { ‘ | “ } <any> [<any>] { ‘ | “ }
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929299 and https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929300 In contrast, in JMS approximate literals use the Java floating-point literal syntax.
The spec mandates: > The wildcard matching MUST consume as few characters as possible.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of the JMS message selector syntax as introduced in #14110, support a subset of the AMQP SQL Filter Expressions syntax as defined in AMQP Filter Expressions Version 1.0 Committee Specification Draft 01.